Naming items in Code Block

Could someone please explain to me the difference in the coding?

 

My “add File” button in the forum does not work and thus I could not screen shoot preview my code. Instead I just pasted the code.

Please explain to me the difference in coding when using the code curves[1], curves<1>, curves, and curves().

 

curves[1]

firstCurves = List.FirstItem(curves[1]);
secondAndThirdCurves = List.RestOfItems(curves[1]);
firstCurves.Join(secondAndThirdCurves);

 

curves<1>

firstCurves = List.FirstItem(curves<1>);
secondAndThirdCurves = List.RestOfItems(curves<1>);
firstCurves.Join(secondAndThirdCurves);

 

curves

firstCurves = List.FirstItem(curves);
secondAndThirdCurves = List.RestOfItems(curves);
firstCurves.Join(secondAndThirdCurves);

curves()

firstCurves = List.FirstItem(curves());
secondAndThirdCurves = List.RestOfItems(curves());
firstCurves.Join(secondAndThirdCurves);

curves[1] will get you the item at Index 1 from a list. This is the DesignScript/Python variant of ‘GetItemAtIndex’

For example:

[0]

[0] curveZero

[1] curveOne

[2] curveTwo

It will return, in this case, ‘curveOne’.

curves<1> is a Replication Guide. This tells Dynamo how to treat the data. Refer to my simple Introduction to DesignScript and Replication Guides on the Revitforum website.

The aforementioned website will also discuss Creators, Queries and Transformers, which refers to your two final points :slight_smile: