DesignScript Problems

Hey guys,

Just trying to expand my knowledge of design script and programming in general. So I grabbed a snippet from the developer of biMorphs (thank you mr. mahon). And then I threw a for loop in to iterate over multiple objects (Thanks to two other contributors for helping with my shoddy for loop skills). So now I am trying to use the same script on non linked (Category) instead of a linked assemblies. I am attaching the original script plus what I believe is a correct step in the path to the end result (I have deleted the link variables). But I am still getting a weird error occurring. Please help!

All of the code you show is Python based, not Design Script. Design script can only be leveraged in Dynamo, and only via a code block. Python is more universal, runs in more platforms, and can call libraries and functions not initially loaded by Dynamo, but requires that all content is loaded as a result.

If you’d like to review how to do this with Design Script, start with the Dynamo Primer (all of it not just the design script section), then move onto the more in depth language manual and initial summary guide, and then review @solamour’s presentation material and examples on his GitHub. This will provide a good history, give you all the resources so you know what’s where, and follow the general sequence which most of us have gone through. Don’t struggle too much with the middle two as they are more technical in nature and serve more as reference guides for the end result.

Your other topic may have some new posts which are beneficial to review. :slight_smile:

If you’d prefer to keep to Python, let us know so we can change the topic name. Python may in fact be better suited for your use in this case, but I’m not sure as I haven’t retyped or reviewed the code you provided. The error message is pretty telling though - adding a filter to remove view templates may be required. Other community members can certainly provide some guidance on that front. I also recommend looking into the work of people like @Thomas_Mahon, @Andreas_Dieckmann, @john_pierson and others who have open sourced Python in their packages, this forum, and elsewhere on the web.


One amendment - you can call DesignScript code inside a Python Node inside Dynamo :slight_smile: You just need to import Protogeometry or DSCoreNodes