DesignScript Coordinate Translation #5, Code to Node

Hi Everyone:

If these posts seem redundant then you know your learning… LOL.  The next DSS example from the DSE  is “CoordinateSystem.ByOriginVectors”, the fifth file on the list.


DesignScript Coordinate Translation #5, Code to Node

After opening the file,  copy it, then open DSS to a blank canvas and paste the code into a code block on the canvas.

Again note, if one wants to run the file in DSS then after pasting it into the canvas be sure to delete “import(“ProtoGeometry.dll”) from the canvas. As mentioned previously, commenting out either the whole code with” /* “at the beginning of code & at the end of the code ” */ ” to render it invisible to the program. Another method is to use “//” at the front end of each line of code.


Screenshot 2014-01-20 12.24.37

This portion of the script can be quickly translated using the Library on the DSS canvas. It’s pretty short and straightforward. (see below)


What one can do accomplishing this portion of the translation is save the file and then do a “saveas”…in this case CoordinateSystem.ByOriginVectors#5a. Then generate the additional code various properties.

Screenshot 2014-01-22 16.10.58

Now lets take a look at some of the changes that can be made to make the script more legible both in graph node form and especially in code form.


Access the Library and search for driver node. Double click on it and place it in the canvas. In this case we have Var41… (variable 41) with a value of 0. Edit it to look something like below.


The reason for doing this is to eliminate the Var41 name to something more informative. Note also that the WCS coordinate system identity was added to the opening node. This was done for the same reason.


This may seem pretty tedious, which it is at the moment but it might very well be worthwhile in a large and more complex file.

Screenshot 2014-01-22 16.10.23

Notice above how the Graph node file reads now when translated back into Code form. See “Node to Code” in the  DesignScript Language Manual . (page 83) Much more informative than a bunch of Var41..38..01..etc. Still one can edit a Var41 to another identity as long as there is consistency in the code.

Screen Shot 2014-01-15 at 5.48.00 PM




Not much of a Graphic…but the question is about learning something.


Thanks for looking




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s