Previous example showed you how to create a very simple rectangular line. Let's say that this line represents one cord of a truss system. You would want end-user to be able to define different section profiles for your structure.
First define a parameter in the same object as EndUserInputFields parameter. This will create the input field in Params explorer for the user. The value is by default set to the section you already have in the project.
<P N="DiagonalCordSection" V="RectangleSection" T="Section" D="section profile for diagonals" />
Now all the line objects representing the diagonals truss cords, you will have a parameter named Section and its value will be set to DiagonalCordSection.
<P N="Section" V="DiagonalCordSection" T="Section" />
That means as user modifies parameter DiagonalCordSection, the cross-section of those lines referring to it will also be changed.
For the below example, go to Assets view of STARK. First import a standard material and then import a standard W shape. Now we have a new section in the project, which we can now assign to the lines. In 3D view, open Params explorer. You will see the editable parameter created for the user. Click on it and choose the new W shape as the value.
You will see that the line uses the W shape to render on screen.
Parts of the code changed since the Working with Sections 1 are in bold.
<O N="Example: Working With Sections 2" T="Project">
<O T="Group">
<P N="EndUserInputFields" V="1" T="Num" />
<P N="DiagonalCordSection" V="W44X335" T="Section" D="section profile for diagonals" />
</O>
<O N="RectangleSection" T="Section">
<O T="Shape">
<O T="Point" X="-12" Y="-12" />
<O T="Point" X="12" Y="-12" />
<O T="Point" X="12" Y="12" />
<O T="Point" X="-12" Y="12" />
</O>
</O>
<O T="Line">
<P N="Section" V="DiagonalCordSection" T="Section" />
<O T="Point" X="0" Y="0" />
<O T="Point" X="480" Y="0" />
</O>
</O>