Design Script - Selective On/Off Visibility for internal components


In DYNAMO, if I want to translate geometry – both location AND orientation, I can

  1. use coordinatesystem.transform and/or coordinatesytem.rotate to create the new location/orientation and then Geometry.Transform to move the geometry where I want it. This is nice because on can have the geometry in both locations, and can have the freedom to turn off the original geometry. This is also nice because if I were to perform this operation multiple times (ie translating a CS 3 or more times) I have a snapshot of the geometry AND its CS at each point in the transformation and can access and/or extract it for use. Almost like each CS functions as a ball joint-- like a Revit Reference Point.




I can also do the same with a code block and Design Script. Awesome.




















But how far can I take this code block? Can I turn off visibility of the geometry and/or cs at different points in the transformation if the whole sequence happens inside a code block? Right now, when I select the code block it highlights ALL included geometry and cs. When definitions get really complex, it’s important to be able to hide the process in the preview window.



Usually when I get a really long code block that creates a lot of geometry, I turn off the visibility for the whole block and connect just what I need to view at the moment to an “Object.Identity” node.

BINGO. Exactly what I needed. Considering it is usually half of the associated elements one wants to be visible after the sequence anyway.

In future releases it would be nice to still hide components by right clicking the output of the codeblock and turning off preview. Thanks Dimitar.



That would be great indeed. Maybe something similar to commenting out a code line could be used to disable a certain line from appearing in the background preview.


You can file for a feature request here:


Dimitir, Issue submitted, and thanks for the confirmation and ideas.