Export
The "Export" object serves as a container for parameters or definitions of other objects intended for sharing with various components within a library. This object type plays a crucial role in establishing parametric relationship between different library components by providing the parameter and object information it contains when called by its type.
When an object is called by its type within the OpenBrIM-App, the system navigates to library and find the object by type. After line by line processing of the code, parameters that do not have role="Input" are being erased from memory. For communication with other objects, all parameters and objects that need to be retained for this reason should be defined within "Export" so that they are not deleted. As a result, the parameters within the "Export" object are moved to the App's Source Code.
The operating of two separate Objects created in the Library in the OpenBrIM App:
Example:
...
...
<O T="Export">
<O N="Parameters" T="Group">
<P N="Topelevation" V="depth" />
<P N="ElevationDif" V="Topelevation+25" />
</O>
<O N="refline" T="Line" D="Reference Line">
<O N="R1" T="Point" X="0" Y="0" Z="Topelevation" />
<O N="R2" T="Point" X="length" Y="width" Z="Topelevation" />
</O>
</O>
</O> |
The library code illustrated above exports a reference line named refline exports elevation parameters named Topelevation and ElevationDif. When this object called by its type in the App, the parameters and line object are exported to the project source code as demonstrated below. |
Source Code in OpenBrIM App
|
To view this example in the library, see(OpenBrIM Platform)
Let’s see how library components are using other components' parameters or sub-objects that are exported to the source code;
Example:
This example consists of 3 different library component which are representing a pedestal, a flagpole and a flag to illustrate how these 3 objects are parametrically connecte. |
---|
Base Object : This object has 4 inputs which are the coordinates of reference point, width, length and depth of the base. It creates a 3D volume object from these inputs and exports a reference line which is a diagonal path of flagpole. |
<O N="ExportExampleObject1" T="Project" Category="Core Objects">
<!-- created by ParamML Examples on 8/31/2023 -->
<P N="Starting_Point" V="[1,2,3]" Role="Input" />
<P N="Wf" V="20" D="Width of the foundation" Role="Input" />
<P N="Lf" V="20" D="Length of the foundation" Role="Input" />
<P N="Hf" V="2" D="Height of the foundation" Role="Input" />
<O T="Volume">
<P N="Opacity" V="0.5" />
<O N="bottomN" T="Surface" X="Starting_Point[0]" Y="Starting_Point[1]" Z="Starting_Point[2]">
<O T="Point" X="0" Y="0" Z="0" />
<O T="Point" X="Wf" Y="0" Z="0" />
<O T="Point" X="Wf" Y="Lf" Z="0" />
<O T="Point" X="0" Y="Lf" Z="0" />
</O>
<O N="TopN" T="Surface" X="Starting_Point[0]" Y="Starting_Point[1]" Z="Starting_Point[2]+Hf">
<O T="Point" X="0" Y="0" />
<O T="Point" X="Wf" Y="0" />
<O T="Point" X="Wf" Y="Lf" />
<O T="Point" X="0" Y="Lf" />
</O>
</O>
<O T="Export">
<O N="RefLine" T="Volume" X="Starting_Point[0]" Y="Starting_Point[1]" Z="Starting_Point[2]">
<O N="Point1" T="Point" X="0" Y="0" Z="Hf" />
<O N="Point2" T="Point" X="Wf" Y="Lf" Z="Hf" />
</O>
<P N="FoundCoord" V="toglobal(RefLine)" />
<P N="midpoint" V="onliner(FoundCoord,0.5)" />
</O>
</O> |
3D view To vew this example in library, see OpenBrIM Platform |
Flagpole : This object requires a base object whose type is ExportExampleObject1 and other geometric inputs to create a pedestal and a pole for flag. Also there are 2 offset inputs to change the location of the pedestal and pole on the base by using the reference line that is exported from ExportExampleObject1. Finally this object also exports reference line for flag object. |
<O N="ExportExampleObject2" T="Project" Category="Core Objects">
<!-- created by ParamML Examples on 8/31/2023 -->
<P N="BaseObj" V="EEO" T="ExportExampleObject1" Role="Input" />
<O T="ParamInfo" Min="1" Max="1" Required="1" Pick="1" Param="BaseObj" />
<O N="GeoInputs" T="Group">
<P N="width_pedestal" V="5" D="Width of pedestal" Role="Input" Category="GeoInputs" />
<P N="height_pedestal" V="1" D="Height of pedestal" Role="Input" Category="GeoInputs" />
<P N="R" V="1" D="Radius of Flagpole" Role="Input" Category="GeoInputs" />
<P N="thickness" V="0.25" D="Thickness of Flagpole" Role="Input" Category="GeoInputs" />
<P N="h2" V="10" D="Height of Flagpole" Role="Input" Category="GeoInputs" />
<P N="xoff" V="0" D="Offset in X direction" Role="Input" Category="GeoInputs" />
<P N="yoff" V="0" D="Offset in Y direction" Role="Input" Category="GeoInputs" />
</O>
<O N="Pedestal" T="Volume">
<P N="Opacity" V="0.7" />
<O N="Bottomp" T="Surface" X="BaseObj.midpoint[0]+xoff" Y="BaseObj.midpoint[1]+yoff" Z="BaseObj.midpoint[2]">
<O T="Point" X="-width_pedestal/2" Y="-width_pedestal/2" Z="0" />
<O T="Point" X="width_pedestal/2" Y="-width_pedestal/2" Z="0" />
<O T="Point" X="width_pedestal/2" Y="width_pedestal/2" Z="0" />
<O T="Point" X="-width_pedestal/2" Y="width_pedestal/2" Z="0" />
</O>
<O N="Topp" T="Surface" X="BaseObj.midpoint[0]+xoff" Y="BaseObj.midpoint[1]+yoff" Z="BaseObj.midpoint[2]">
<O T="Point" X="-width_pedestal/2" Y="-width_pedestal/2" Z="height_pedestal" />
<O T="Point" X="width_pedestal/2" Y="-width_pedestal/2" Z="height_pedestal" />
<O T="Point" X="width_pedestal/2" Y="width_pedestal/2" Z="height_pedestal" />
<O T="Point" X="-width_pedestal/2" Y="width_pedestal/2" Z="height_pedestal" />
</O>
</O>
<O N="FlagPole" T="Group">
<P N="Opacity" V="0.7" />
<O N="L" T="Line">
<O T="Point" X="BaseObj.midpoint[0]+xoff" Y="BaseObj.midpoint[1]+yoff" Z="BaseObj.midpoint[2]+kalinlik" />
<O T="Point" X="BaseObj.midpoint[0]+xoff" Y="BaseObj.midpoint[1]+yoff" Z="BaseObj.midpoint[2]+h2+kalinlik" />
<O T="Section">
<O T="Circle" Radius="R" />
<O T="Circle" Radius="R-thickness" IsCutout="1" />
</O>
</O>
</O>
<O T="Export">
<O N="RefLine2" T="Line">
<O N="PT1" T="Point" X="BaseObj.midpoint[0]+xoff+R/sqrt(2)" Y="BaseObj.midpoint[1]+yoff+R/sqrt(2)" Z="BaseObj.midpoint[2]+kalinlik" />
<O N="PT2" T="Point" X="BaseObj.midpoint[0]+xoff+R/sqrt(2)" Y="BaseObj.midpoint[1]+yoff+R/sqrt(2)" Z="BaseObj.midpoint[2]+h2+kalinlik" />
</O>
<P N="PoleCoord" V="toglobal(RefLine2)" />
<P N="midpoint2" V="onliner(PoleCoord,0.5)" />
</O>
<O T="Private">
<O N="EEO" T="ExportExampleObject1">
<P N="Starting_Point" V="[1,2,3]" />
<P N="Wf" V="20" D="Width of the foundation" />
<P N="Lf" V="20" D="Length of the foundation" />
<P N="Hf" V="2" D="Height of the foundation" />
<P N="FoundCoord" V="toglobal(RefLine)" />
<P N="midpoint" V="onliner(FoundCoord,0.5)" />
<O N="RefLine" T="Volume" X="Starting_Point[0]" Y="Starting_Point[1]" Z="Starting_Point[2]" Exported="1">
<O N="Point1" T="Point" X="0" Y="0" Z="Hf" />
<O N="Point2" T="Point" X="Wf" Y="Lf" Z="Hf" />
</O>
</O>
</O>
</O> |
To view object in the library, see Engineering on Cloud |
Flag : This object reuires a flag pole object whose type is ExportExampleObject2 and other geometric inputs to create flag. Also there is flag height input to change the flan location in Z axis by using the reference line that is exported from ExportExampleObject2. |
|
To view this object in library, see Engineering on Cloud |
Beware that PoleCoord parameter in ExportExampleObject2 is not used directly in ExportExampleObject3 however it is still needed to be exported to compute the value of midpoint2 parameter in ExportExampleObject2 that is used in the calculations of ExportExampleObject3. |
This example is also a good ilustration of using “Private”, which allows developer to call instances of required objects to the project to simplfy their tasks while simultaneously preventing the creation of those instances within the application.