Remove or Add the object from scene sequence via script - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Remove or Add the object from scene sequence via script (/showthread.php?tid=5289) |
Remove or Add the object from scene sequence via script - savaskorkmaz - 08.03.2024 Hi , I need to add to the scene sequence or to remove from the scene sequence via script like this. value = event.getvalue() if value == true then -- add object '1/1/1' to scene 'homeenter' else -- remove object '1/1/1' to scene 'homeenter' end Thx, RE: Remove or Add the object from scene sequence via script - Daniel - 08.03.2024 Might be simpler to create two scenes with and without the object and just enable/disable them based on the condition above. RE: Remove or Add the object from scene sequence via script - admin - 08.03.2024 Another solution is to use a virtual object with AND gate via an event script: Code: value = event.getvalue() RE: Remove or Add the object from scene sequence via script - savaskorkmaz - 08.03.2024 Unfortunately, neither solution works for me. My goal is for the customer to change the scenarios 100% by himself, on a screen. I have a design like the attached picture. Theoretically, I can create a virtual output poinst and virtual selection points for all group addresses and gate them with the event script. However, we are doing this demo not for our own project, but for our dealers, and creating hundreds of additional points and creating hundreds of additional scripts is not a sustainable business and partners eventually mix up the scripts and the job becomes impossible. For this reason, my only way is to add and remove objects with a simple script. I need your help on this matter. Note : i can' upload picture to the post. here is the link of screen. https://ibb.co/qxStbzC RE: Remove or Add the object from scene sequence via script - Daniel - 08.03.2024 Do you know this? RE: Remove or Add the object from scene sequence via script - savaskorkmaz - 08.03.2024 I need a solution for visualation page. Not for mosaic beta (08.03.2024, 09:29)savaskorkmaz Wrote: Unfortunately, neither solution works for me. My goal is for the customer to change the scenarios 100% by himself, on a screen. RE: Remove or Add the object from scene sequence via script - admin - 08.03.2024 Add to Common functions: Code: function getscenebyname(name) Usage example: Code: scenename = 'test' Scene name must be unique. Each object can be in the scene only once. RE: Remove or Add the object from scene sequence via script - savaskorkmaz - 09.03.2024 Worked wery well. Thx a lot. |