We will extend Bolted Plate 1 example and extend it by positioning another plate in the project. The new plate will be 90 degrees to the side of the first plate. Here is what it looks like:
Here is the code -- the parts that got changed since Bolted Plate 1 are in bold.
<O N="Bolted Plate 2" T="Project">
<!-- Plate 1 is basically same as the example in Bolted Plate 1.
We just moved the parameters into the Surface representing the plate.
we want each plate to contain its own parameters because we will have
multiple plates in the same project.
-->
<O N="Plate1" T="Surface">
<P N="Thickness" V="t" />
<P N="spX" V="(w-c*2)/(nb-1)" D="spacing between bolt holes along X direction" />
<P N="spY" V="(h-c*2)/(nr-1)" D="spacing between bolt holes along Y direction" />
<O N="Plate 1 Params" T="Group">
<P N="EndUserInputFields" V="1" />
<P N="w" V="48" D="Plate 1: width of the plate" />
<P N="h" V="48" D="Plate 1: height of the plate" />
<P N="t" V="1" D="Plate 1: thickness of the plate" />
<P N="nr" V="5" D="Plate 1: number of rows" />
<P N="nb" V="5" D="Plate 1: number of equally spaced bolts per row" />
<P N="r" V="1" D="Plate 1: radius of bolt hole" />
<P N="c" V="6" D="Plate 1: clearance from edge" />
</O>
<O T="Point" X="-w/2" Y="-h/2" Z="0" />
<O T="Point" X="w/2" Y="-h/2" Z="0" />
<O T="Point" X="w/2" Y="h/2" Z="0" />
<O T="Point" X="-w/2" Y="h/2" Z="0" />
<O T="Repeat">
<P N="S" V="0" />
<P N="I" V="1" />
<P N="E" V="nr-1" />
<P N="CTRL" V="j" T="Text" />
<P N="j" V="0" />
<O T="Repeat">
<P N="S" V="0" />
<P N="I" V="1" />
<P N="E" V="nb-1" />
<P N="CTRL" V="i" T="Text" />
<P N="i" V="0" />
<P N="locX" V="-w/2 + c + spX * i" D="X location of the bolt hole" />
<P N="locY" V="-h/2 + c + spY * j" D="Y location of the bolt hole" />
<O T="Circle" X="locX" Y="locY">
<P N="IsCutout" V="1" />
<P N="Radius" V="r" />
</O>
</O>
</O>
</O>
<!-- Plate 2 is exact same replica as Plate 1 above except I will use Y and Z
to move the plate and RX to rotate so that it is 90 degrees oriented and
always positioned at the edge of the first plate.
Notice the way I set the Y location of Plate 2
based on the height of Plate 1. If I say h (height), it would have
picked up the height of Plate 2 because that is the closest parameter
named h to this object. By using dot notation Plate1.h, I am explicitly
telling STARK that I want the height of the first plate.
I can use X, Y and Z parameter on surface Plate 2 to move Plate 2
in 3D space. I can use RX, RY and RZ parameter to rotate the plate, values
are always in radians.
Rotation are by default about the local origin of the plate, but you
can specify AX, AY and AZ to specify the rotation origin.
-->
<O N="Plate 2" T="Surface" Y="Plate1.h/2" Z="w/2" RX="PI/2">
<P N="Thickness" V="t" />
<P N="spX" V="(w-c*2)/(nb-1)" D="spacing between bolt holes along X direction" />
<P N="spY" V="(h-c*2)/(nr-1)" D="spacing between bolt holes along Y direction" />
<O N="Plate 2 Params" T="Group">
<P N="EndUserInputFields" V="1" />
<P N="w" V="48" D="Plate 2: width of the plate" />
<P N="h" V="48" D="Plate 2: height of the plate" />
<P N="t" V="1" D="Plate 2: thickness of the plate" />
<P N="nr" V="5" D="Plate 2: number of rows" />
<P N="nb" V="5" D="Plate 2: number of equally spaced bolts per row" />
<P N="r" V="1" D="Plate 2: radius of bolt hole" />
<P N="c" V="6" D="Plate 2: clearance from edge" />
</O>
<O T="Point" X="-w/2" Y="-h/2" Z="0" />
<O T="Point" X="w/2" Y="-h/2" Z="0" />
<O T="Point" X="w/2" Y="h/2" Z="0" />
<O T="Point" X="-w/2" Y="h/2" Z="0" />
<O T="Repeat">
<P N="S" V="0" />
<P N="I" V="1" />
<P N="E" V="nr-1" />
<P N="CTRL" V="j" T="Text" />
<P N="j" V="0" />
<O T="Repeat">
<P N="S" V="0" />
<P N="I" V="1" />
<P N="E" V="nb-1" />
<P N="CTRL" V="i" T="Text" />
<P N="i" V="0" />
<P N="locX" V="-w/2 + c + spX * i" D="X location of the bolt hole" />
<P N="locY" V="-h/2 + c + spY * j" D="Y location of the bolt hole" />
<O T="Circle" X="locX" Y="locY">
<P N="IsCutout" V="1" />
<P N="Radius" V="r" />
</O>
</O>
</O>
</O>
</O>