Stacked Assemblies with Mapping

<< Click to Display Table of Contents >>

Navigation:  PlantExpressTools > How to use > Assemblies >

Stacked Assemblies with Mapping

Previous pageReturn to chapter overviewNext page

This chapter explains how you can use the mapping option for Assemblies instead of using Acquisition Rules.

You can also checkout the video which shows the setup and usage of this use case. This video also shows how the result looks in PlantReporter.

We will use two types of Assemblies. The outer most one is a SKID Assembly. And all other ones are Package Units with in the SKID.

PET Assemblies 154

Creating properties

The first thing we do is create some properties under Engineering Items. These properties will later get the values from the Assembly properties. It is recommended, that these properties are defined as read-only. Otherwise the user may override them and the Assembly function will just remap the values and therefore delete the values.

PET Assemblies 155

Setup Assemblies in PlantExpressTools Settings

Now we can setup the Assemblies in the PlantExpressTools Settings dialog.

Click on the "Assemblies" tab to see the new options for mapping properties with Assemblies.

As always, there is the default class with the name "Assemblies".

PET Assemblies 156

Since we don't need the Assemblies class we can either rename the class or delete it.

PET Assemblies 157

After you clicked on delete, the class is gone, but also would be the properties you may have created.

PET Assemblies 158

We create two different Assembly classes. As always you can choose between PolyWindow and PolyCross.

PET Assemblies 159

Next we click on the first class and create the three properties. For the "Type" you have the choice between String, Numeric, and Boolean.

PET Assemblies 160

For the second Assembly class we need two more properties.

PET Assemblies 161

Lastly we use the new mapping of the Assembly class' properties to the properties of the symbols and line segments.

In the first column you select the property of the class. In the second column you select the class where the receiving property is located. Typically it is the EngineeringItems class. This is why we preset the column with the EngineeringItems class. In the third columns you then select the property of the selected class which will get the values from the Assembly class' property.

PET Assemblies 162

For the second Assembly we need two more mappings.

PET Assemblies 163

There are two more checkboxes which are specific to the mapped properties.

The first one is checked by default. It ensures, that the mapping is done for each of the defined Assembly classes for which a mapping is defined. If a symbol/line segment is surrounded by the same Assembly class multiple times (as in the example above), the mapping is done for the closest surrounding Assembly.

The second checkbox ensures, that the mapping is done, right when inserting the symbol/line segment.

PET Assemblies 164

It is recommended to use the checkbox for the Assemblies on the "On Drawing Save" tab. This ensures, that the mapping is done or updated when the drawing is saved.

Since is this example the Assemblies and symbols/line segments are colored by the Calculation function (Calculate AutoCAD Properties) you may also want to consider checking the box for the Calculations

PET Assemblies 165

After closing the the Setting dialog, you click on the Assemblies button.

PET Assemblies 166

As always a dialog shows up where you can still can terminate the creation of the classes and properties.

PET Assemblies 167

A progress panel appears where you can see which classes and properties are being created.

PET Assemblies 168

If you look again at the Settings you will see that the classes and properties are in italic font indicating, that the classes and properties were created. You cannot make any changes to the class/property names and data types anymore after the classes/properties were created. You would need to delete them and created them with the new name.

PET Assemblies 202

Creating Calculations for coloring

This section is not required for mapping, but it help to better see what's happening when later inserting a symbol or line segment.

We use two calculations. One for coloring the Package Unit Assemblies and one for coloring the symbols.

We click on the calculation function to open the dialog.

PET Assemblies 169

We click on "New...".

PET Assemblies 170

We select the "PACKAGE UNIT" class and select the "Color (Index-no.)" in the Property dropwown. Then click on "Edit".

PET Assemblies 171

The Expression Editor opens where we use the following expression. What it does is, that it checks if the InScope property contains a 'Y'. And if so, the color will be set to 2 (Yellow). Otherwise the color will be 3 (Green).

PET Assemblies 172

This isn't foul-proof, because the allowed values are Y and N. So, we could also check for 'N' if it isn't 'Y'. And if it isn't 'N' either we could use a different color.

PET Assemblies 203

After closing the Expression Editor the expression shows up in the "Calculation editor" dialog.

PET Assemblies 173

After another click we see that the calculation is blue and Active which shows that everything is ok.

PET Assemblies 174

The second calculation is for the Engineering Items class which is essentially everything.

PET Assemblies 175

This is how the expression looks like.

First it checks if the SCOPE property is empty. This is for the two Assembly classes where this property will be empty. If it is not empty, the it is either 2 or again as before.

PET Assemblies 176

Again it is blue and Active.

PET Assemblies 177

Finishing settings in Project Setup

Now we need to make some final changes to the Project Setup.

We start with the SKID class and click on "Edit Symbol...".

PET Assemblies 178

Here we set the Layer, Color and Linetype. And since the SKID Assembly has a Tag we must set the Tagging prompt to either Automatic or Prompt.

PET Assemblies 179

We also have to set the color for the block to "ByBlock" in order to have the calculation working.

PET Assemblies 180

Then we click on the "New..." button to define the Tag Name Format.

PET Assemblies 181

We use Type and Number as the two properties.

PET Assemblies 182

Make sure that the new Tag Format is set under TagNameFormat.

PET Assemblies 183

For the PACKAGE UNIT class we set the Layer and Linetype. The color will be calculated, so we don't need to set it.

PET Assemblies 184

We also need to set the color in the block to ByBlock.

PET Assemblies 185

Usage

In order to insert the new Assembly classes we Refresh the SymbolsPalette.

PET Assemblies 186

We insert the SKID Assembly.

PET Assemblies 187

Since Type has a default value of 'SKID' we only need the number.

PET Assemblies 188

If needed you can annotation too.

PET Assemblies 189

Then we insert the first level of PACKAGE UNITS Assemblies. Because of the calculation the Assemblies will be colored in Yellow.

PET Assemblies 190

Then we insert some more.

PET Assemblies 191

We select the second and fourth level Assemblies and set them to 'N' for the Scope.

PET Assemblies 192

After the Scope values has been changed, these Assemblies will now become green.

PET Assemblies 193

Next we select all the PACKAGE UNIT Assemblies on the left and type in '01'.

PET Assemblies 194

On the right we use '02'.

PET Assemblies 195

Then we insert symbols in each level.

PET Assemblies 196

Because of the second calculation the symbols will be colored as soon as they are inserted.

Now we have a look at the properties to see what the mapping of the properties did.

The symbol which is outside every PACKAGE UNIT shows the SKID Tag under SKID.

PET Assemblies 197

The next symbol also shows the PACKAGE UNIT number and the Scope.

PET Assemblies 198

The next one shows the Scope is 'N' coming from the Green Assembly.

PET Assemblies 199

The next inner level is showing 'Y' again.

PET Assemblies 200

And the most inner one is set to 'N' again.

PET Assemblies 201