Hey Marcello,
Great questions, taking them one at a time, my text in bold
I have a few questions.
First GREAT that design script is part of dynamo … well v 7.0xxxxx alpha
I am trying to learn design script and never used it before……
- what does the classic “import” statements mean in a code block in dynamo? Such as “”"”import(“ProtoGeometry.dll”);”"”"”"
are all .dll preloaded so you dont need to say it? what if there were some .dll that were not loaded how do you load them?
since the code block does not allow import statements
Import statements don’t really exist in the Dynamo implementation of DesignScript. They will appear via a menu item, see here: https://www.youtube.com/watch?v=9Iwq32JCu2g for an example of how it’s going to look.
This features wasn’t included in 070 Alpha whilst we harden it. We’ll be turning it on again soon when we’ve got some bugs worked out.
If you’re feeling really optimistic, you can turn it on by re-enabling these lines in DynamoView.xaml, and rebuilding.
<MenuItem Header="_Libraries" Name="LibraryManagerMenu" Focusable="False" IsEnabled="True">
<MenuItem Focusable=“False” Header="_Import Library…" Command="{Binding Path=DataContext.ImportLibraryCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:DynamoView}}}" Name=“importLibrary”/>
</MenuItem>
|
Alternatively, hang tight for a couple of our quick increment releases.
It’s worth noting, we’re committed to this feature. We use it for loading all of the features you see in the libraries view. So it will be coming back.
- looping
I read the design script user manual and the looping example does not work if you simply copy paste the example in the code block and wire it to a watch node
Code is below.
you get errors. Were you able to get this to work?
Imperative code in Code Block Nodes is not really supported in 070 Alpha. Sorry.
Again, we had a lot to get working, and we decided to turn the features on progressively rather than delaying the release. Imperative and looping will be coming online in a subsequent increment release, like the import above.
were ALL EXAMPLES from the design script manual tested in the code block of dynamo?
No. Quite a few of them weren’t. Sorry about that. We’ll be folding the manual into the Dynamo manual and updating it.
- could you explain how design script studio (that uses boxes and wires similar to dynamo) fit in with dynamo? will it ever be a part of dynamo? would it be to confusing to have two visual programming styles in one program?
The best bits of DesignScript Studio are being taken and folded into the Dynamo interface. If you look back at Dynamo from before we started the merge (about 6 months ago) and look at it now, you’ll see a bunch of similarities to DSS. And there’ll be more to come.
- where could I find EVERY available command for design script language. the design script manual does not have them all in there?.
Hmmm. We have a language specification, but it’s not really great for humans (as opposed to programming language implementors).
As the DS engine now underlies Dynamo, everything that you see in the library is really a ‘command’ in the language. In terms of keywords, expressions, statements etc. the manual pretty much contains them. But you’re right, we should produce a cheat-sheet summary. Tracking this task internally as MAGN-3100.
- will design script in the code block window ever have intelligent typing? meaning I could type “line = Line.” and when I place the dot if gives me the following options a.
YES! Back in the day, the DesignScript Editor used to be able to do this. For various reasons involved in the design of the language we can do even better than Visual Studio on this - supporting this ‘intelligent typing’ very well was one of my key design concerns in the design of the DesignScript execution engine. I know it’s really really important.
Hope this helps, love the questions, please keep them coming and bear with us through the incremental releasees turning the features you’re asking for back on.