Design Script - Selective On/Off Visibility for internal components


#1

All,

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.

01 COORDINATE SYSTEMS

 

 

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

02 COORDINATE SYSTEMS code block

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.

Cheerio.

 


#2

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.


#3

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.

Cheerio

03 COORDINATE SYSTEMS Object.Identity


#4

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.

2015-06-12_09-38-31

You can file for a feature request here:

 


#5

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