Stacked Assemblies with Acquisitions

<< Click to Display Table of Contents >>

Navigation:  PlantExpressTools > How to use > Assemblies >

Stacked Assemblies with Acquisitions

Previous pageReturn to chapter overviewNext page

This chapter explains in detail how you setup stacked Assemblies (Assemblies within Assemblies) with the use of acquisition rules.

Stacked Assemblies are Assemblies which have a relationship. The following picture illustrates three level of Assemblies where L1 is the most outer Assembly and L3 is the most inner Assembly. Also, Assemblies must not overlap but be located within each other.

PET Assemblies 81

We start fresh by clicking on the Assembly button.

PET Assemblies 82

Click OK to create the classes.

PET Assemblies 83

Again, we have the default symbol.

PET Assemblies 84

But this time we don't need the default symbol for the Assemblies class. In order to delete the symbol we first must set the GraphicalStyleName to blank and click on Apply.

PET Assemblies 85

After that, you again must set GraphicalStyleName to blank before you can click on "Remove Symbol...".

PET Assemblies 86

You will be ask if you really want to delete the symbol.

PET Assemblies 87

Now we need to create three classes under the Assemblies class.

PET Assemblies 88

PET Assemblies 89

PET Assemblies 90

PET Assemblies 91

Now we add the default symbol to each of the three classes.

PET Assemblies 92

We select the Assembly_Symbol_Block which is the block we previously had for the Assemblies class.

PET Assemblies 93

PET Assemblies 94

We set the Symbol properties. In this example we use red for Level 1, yellow for Level 2 and green for Level 3.

PET Assemblies 95

PET Assemblies 96

PET Assemblies 97

PET Assemblies 98

PET Assemblies 99

PET Assemblies 100

For the EngineeringItems class we add 7 properties. Assembly1/2/3 Type/Number will later contain the Type and Number information of the Assemblies a line or symbol is in.

Flexible_Tag will later be calculated and holds the combined Assembly Tags a line or symbol is in.

PET Assemblies 121

For the Assemblies class we create the properties we need to create the Tag and also the Tag property itself.

PET Assemblies 101

You may want to set a Default Value for Type if this makes sense to you. This way it is already filled out when you insert an Assembly or convert a Polyline into one.

PET Assemblies 102

For the Tag Format for Level 1 Assembly we use Type and Number.

PET Assemblies 132

Make sure the new Tag is set in TagFormatName.

PET Assemblies 133

Level 2

PET Assemblies 103

Here the Tag Format consists of three properties leading with the Flexible_Tag.

PET Assemblies 134

Again make sure the new Tag is set.

PET Assemblies 135

Level 3 is like Level 2

PET Assemblies 104

PET Assemblies 136

PET Assemblies 137

Now that we have defined all Properties we can create the Acquisition Rules for the EngineeringItems class. It is recommend to make the properties read-only so the user doesn't edit the acquired values later on. However, if you keep them read-writable you are more flexible in case there is an except to the (Acquisition) Rule and you want to override it.

PET Assemblies 105

For the Equipment we also create a new Tag Format with the Flexible_Tag as the "Prefix".

PET Assemblies 106

Make sure it is set.

PET Assemblies 124

The same for the HandValves class.

PET Assemblies 125

PET Assemblies 126

You would need to do this for all classes which have a Tag, but for this example Equipment and HandValves should suffice.

Now we convert the outer Polyline to a Level 1 Assembly. Of course you can also use the tool palette or the PlantExpressTools' SymbolsPalette.

PET Assemblies 122

Use Convert.

PET Assemblies 107

Select Level 1.

PET Assemblies 108

Repeat this for all Polylines. The end result looks like this:

PET Assemblies 109

Now we need to create a calculation to calculate the Flexible_Tag property. For this, you click on the "Edit Calculation" button.

PET Assemblies 110

Click on "New..." to create a new calculation.

PET Assemblies 111

Select Engineering Items class the the Flexible_Tag Property.

PET Assemblies 112

Next you click on Edit.

PET Assemblies 113

We need the following expression. You can also copy it from the description below the next image.

For details on the Calculation function and the Expression Editor have a look here.

PET Assemblies 114
 

IIF(ISNULLOREMPTY([Assembly1_Type]) And ISNULLOREMPTY([Assembly1_Number]),

 '',

 IIF(ISNULLOREMPTY([Assembly2_Type]) And ISNULLOREMPTY([Assembly2_Number]),

         [Assembly1_Type]+[Assembly1_Number],

         IIF(ISNULLOREMPTY([Assembly3_Type]) And ISNULLOREMPTY([Assembly3_Number]),

                 [Assembly1_Type]+[Assembly1_Number]+[Assembly2_Type]+[Assembly2_Number],

                 [Assembly1_Type]+[Assembly1_Number]+[Assembly2_Type]+[Assembly2_Number]+[Assembly3_Type]+[Assembly3_Number]

         )

 )

)

After you click on OK you see the expression in the dialog where you click on OK again.

PET Assemblies 115

If everything is OK the text color is blue and the Status is active.

PET Assemblies 116

We recommend to enable the following check boxes so all relevant functions will be updated when the drawing will be saved. Otherwise you may need to click on various update buttons in the ribbon.

PET Assemblies 117

After saving the drawing we click on the Level 1 Assembly and see that the Tag is A1 made out of A and 1. Flexible_Tag is empty, because the Level 1 Assembly is the most outer object. Everything else is in this Assembly.

PET Assemblies 118

If you use Assign Tag the dialog looks like this:

PET Assemblies 138

If we click on the lower Level 2 Assembly, we see that Assembly1_Type and _Number are acquired from the Level 1 Assemblies' Type and Number. The Flexible_Tag is calculated from Assembly1_Type and _Number

PET Assemblies 119

Editing the Tag shows the Flexible_Tag as a sort of prefix.

PET Assemblies 139

The upper Level 2 Assembly uses 2 instead of 1, because both Level 2 Assemblies belong to the Level 1 Assembly and therefor the tag must still be unique.

PET Assemblies 120

Selecting one of the Level 3 Assemblies shows this. Here the Flexible_Tag is made out of Level 1 and level 2.

PET Assemblies 123

The Assign Tag is showing this.

PET Assemblies 140

If we select one of the Tanks we see that the Flexible_Tag is A1, because the Tank is not within the confines of Level 2.

PET Assemblies 127

Assigning the Tag shows the Flexible_Tag again.

PET Assemblies 128

The valve is within Level 2.

PET Assemblies 129+

The check valve is in Level 3.

PET Assemblies 130

The Pump as well.

PET Assemblies 131