Hi Everyone:
This translation is from the fourteenth chapter of the DesignScript Language Manual and can be found at DSLM (pages 44-46) and is entitled; IDE: Step In, Step Out, Watching, Breakpoints. There also is a companion video tutorial entitled, IDE Basics (#3), which can be found in the DS website’s tutorials.
The initial manual translation was made on the Autodesk DesignScript Community Forum and DesignScript.org. Now it can be found at can be found at Chapter 14: IDE: Step In, Step Out, Watching, Breakpoints Translating to DesignScript Graph-Node. (Note that it can be not longer be found on the Autodesk Labs Website, as linked.)
IDE which stands for Integrated, or Interactive, Development Environment is DesignScript’s text Editor which is a users tool to not only mirror and write programs, but to also track down bugs in one’s script and aid in calling up the appropriate DS language.
Open the DS Editor and create a new file, lets copy and paste the first and second page of code from Chapter 14 (pages 44 & 45) into the Editor. Separate the code by commenting out the “import” statements at the top of the second bit of code to avoid a editor malfunction. Run it, and observe the their errors generated, as intended and illustrated and highlighted below.
Reiterating about this file, it has a error, and the Editor has the facility to help locate it. Now paste the same script into a blank canvas on DesignScript Studio.
Edited out the commenting out so the script will be activated, but first make sure that the “import” statements are commented out. Note keep the highlighted middle of the script import’s commented out.
One see’s that the “Variable is over indexed” so it’s noted that this a problem with geometry indexed to [5], not [8].
After geometry [8] is changed to [5] another error is encountered, we have to remember that “Class and Function definitions are not supported in “DesignScript Studio.”
After commenting out the last bit of code then, the code-block is activated, and a result is obtained for the first portion of code. Developing and breaking out the script into code blocks is shown in the DS Studio canvas in it’s initial translation.
A more detailed and defined translation was done and involved naming the variables to identify and reference into them to their corresponding nodes.
Then with the naming and identifying complete, the “Node to Code” operation can take place.
The Windows Graphic that is generated from the files.
Note that colors were added in this translation, to highlight the geometry in the Graphic view window.
Reiterating, this was done on the stand-alone version of DesignScript, rather than as a plugin for AutoCAD. The files are available for downloading from the Drop-Box links below.
Thanks for looking.
T!M