PID Components Classification
For AseptSoft Core to integrate with Autodesk AutoCAD it reads data regarding the PID Shape Components which are always created by the user in order to classify them and create the runtime engine which can be used to design the Process and the Algorithm.
The ways AseptSoft recognizes the types of PID Shape Components is related to an artificial system it provides regarding Properties of these shapes and their classes, which can be created, edited and deleted using the Classification group in the Home Ribbon in AutoCAD.
A PID in AutoCAD is mainly built using Block References and Basic Shapes (like Polylines, MTexts, etc).
The problem in AutoCAD is that unlike Plant3D it does not contain rich information about the blocks (assets in Plant3D).
Because of this we created an entire system which recognized the types of blocks, their Tags, Sizes, etc. using Geometrical Analysis, advanced algorithms and artificial intelligence. It can reliably find the Tags and other properties of Block definitions in the PID, and use this to generate the right Information AseptSoft needs to perform.
Environments
Before going in details about the Classes Definitions, there is an organizational matter that you might have multiple types of PID with different block definitions. For example in a PID you might have a Block Definition named “Manual Valve” with a tag of type “MV-101” and in a second PID you might have a Block Definition named “Manual Valve” as well, but this time the tag should look like “X-VM-AR-202”. The Tag identification software will need different rules for the same type “Manual Valve”. This is when you create 2 environments. One for the PIDs that are similar to the first one, and a second one for the PIDs that are similar to the second one.
Each computer can host multiple Classes Definitions Environments.
One Environment contains Classes Definitions Properties. These properties define how a class can build up a tag from information placed nearby it is on the PID.
Environments are located in the User settings according to File System .
To change between environments, use the “Choose Environment” button in the Home Ribbon, and click on the Environment you want to use, or create a new one.
![](../__attachments/86999041/image-20230510-105653.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
In these Environments, each class can have multiple Attributes, as well as a Control Type property.
Tags and other properties automatic Recognition
AseptSoft will look among the Block References for Engineering Items, Instruments and Sources.
![](../__attachments/86999041/image-20230116-100352.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Engineering item: Valve
![](../__attachments/86999041/image-20230116-100549.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Engineering Item: Tank
![](../__attachments/86999041/image-20230116-100455.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Source
![](../__attachments/86999041/image-20230116-100529.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Instrument
The classification is done based on the Class Properties and Block properties of each Block Reference in the chosen Environment as we will describe further on.
To edit these click “Class Properties” and then select one class at a time either in the window or in AutoCAD:
Select the single Block Reference belonging to the class you want to update:
Click Class Properties
On the Classification Window you can see That the “PIP GATE VALVE” class definition is now being edited. To change to another class, either select a different class from the combo box, or in AutoCAD select another single block reference.
To easier create the Tokens described below, use the Token Builder window:
Tokens
AseptSoft recognizes special tokens used in any property of any block or class, and solve them to produce the actual values of those properties.
Let’s begin with a few examples of how the tags or other information can be spread over the PIDs:
AseptSoft will look in the classes definitions in all the properties, and look for special tokens which tells how the specific property can be replaced.
For example if you set the Tag-Build property to: “X-$$property(Type)$$-$$property(Loop)$$”
Then AseptSoft will replace this 2 tokens in the Tag-Build with the actual values from each block reference to build their tags. Assuming that the blocks have the AutoCAD Attributes Type and Loop, then for a Control with Type=”VM” and Loop=”132” the Tag would be “X-VM-232” as built from the Tag-Build Attribute.
AseptSoft analyses every single property of each Class Definition and each Block Definition and replaces the tokens with their values.
There are multiple types of tokens AseptSoft recognizes, and each has specific patterns and rules:
Self Property Acquisition Token
This is used in the ideal scenario when a Control Already owns the AutoCAD Attribute needed to build the property.
This token follows the pattern:
$$property( <AutoCAD Attribute > )$$
![](../__attachments/86999041/image-20230510-144953.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Block Refference which owns the attributes
In the case above, the tag can be builded like:
”$$property(Type)$$-$$property(LoopNumber)$$”
And will produce: “CV-1001”
Note that there are more options for writing the relevant AutoCAD Attribute Name:
Name as is: if the attribute has the Tag Abc, you will refer to it as is, Abc. If the Attribute Tag is #(TargetObject.Type), you can refer to it as is, #(TargetObject.Type) This option works for any Attribute Name. The following options are just to easier the process.
It is common when a PID has been created in Plant3D and then exported to AutoCAD, the previous Tags will arrive in AutoCAD as Attributes with tags of pattern #(TargetObject.PropertyNameInPlant3D)
Skip the #(TargetObject. ) part and write only the content. In this scenario, to refer to an Attribute named #(TargetObject.Type) simply write Type. If it happens that the source Block Reference also contains an Attribute named Type, the first one between #(TargetObject.Type) and Type in the Properties list will be used.
Skip the #(TargetObject. ) part for a multi-component Attribute. This is a general case of the one above. You might need it when you encounter attributes which have a form like: #(TargetObject.Type)#(TargetObject.UnitNumber)#(TargetObject.LoopNumber). To refer to this attribute simply use: Type,,UnitNumber ,, LoopNumber. You can insert as many spaces as you want between the separator ,, (two commas) and each component name.
The Attribute Matching is Case-insensitive. So we assume that TYPE=Type=type=TyPe.
If you have multiple Attributes that can match a token, the first one in the Properties table will be chosen to provide information for building the Tag
To generate this type of token using the Property Token Builder first select a block belonging to the source class in AutoCAD (or set that class as “Seeked Class” in the window), then set the following window configuration:
![](../__attachments/86999041/image-20230518-145118.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
This Token will only return results when used in the Properties of the same block that defines the $TargetObject(Type) Attribute in AutoCAD
Nearby Property Acquisition Token
This is the scenario when a Block Reference does not own directly the AutoCAD attributes needed to build information, but it is known to have another Block Reference nearby which contains this information. This is a common scenario when PIDs have been originally created in Plant3D and then downgraded to AutoCAD, and the Controls have been split apart from their Tags and Annotations.
This token follows one of the patterns:
$$property(<class name>-><AutoCAD Attribute>)$$
$$property(<class name>((<AutoCAD demanded Attribute>))-><AutoCAD Attribute>)$$
$$property(<class name>((<AutoCAD demanded Attribute>==<Value>))-><AutoCAD Attribute>)$$
The <class name> component defines which is the Class of the nearby Block Reference which is relevant for searching information within.
The <AutoCAD Attribute> component defines which is the Attribute in that Block Reference which must be extracted to build information from.
The <AutoCAD demanded Attribute> component specifies that AseptSoft must choose a source Block Reference which defines that Attribute. Block References matching the class name but which don’t define the demanded Attribute, will be ignored when searching for sources to replace this token
The <Value> component specifies that the demanded <AutoCAD demanded Attribute> property must also have the given value, otherwise it will be ignored when in the search phase for the token.
Example:
![](../__attachments/86999041/image-20230510-142901.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
![](../__attachments/86999041/image-20230510-152930.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Valve Label block defines the Attributes to build Tag and Size from
In this scenario multiple valves have their tags as Block References nearby them. Valves HA-165 and HA-164 are the same class, PIP GATE VALVE, while HA-166 is a PIP GATE VALVE(CLOSED). But all 3 have tags as Block References of class “Valve Label block”, as DIFFERENT blocks than the valves themselves:
![](../__attachments/86999041/image-20230510-143213.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
However, the red Valve (CV 101) is of type PIP GLOBE VALVE, and has the tag more far away, also as a block Reference of type Field Mounted Discrete. te.
![](../__attachments/86999041/image-20230510-153146.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Field Mounted Discrete defines the Attributes to build Tag from
Following the rules defined above, we need to define the Tag-Build property for PIP GATE VALVE and PIP GATE VALVE(CLOSED) as:
$$property(Valve Label block->Tag)$$
which will produce HA-164, HA-165, HA-166
For PIP GLOBE VALVE the Tag-Build property will be defined as:
$$property(Field Mounted Discrete->Type)$$-$$property(Field Mounted Discrete->LoopNumber)$$
which will produce CV-1001
Furthermore, you can even define a Size-Build property for the PIP GATE VALVE and PIP GATE VALVE(CLOSED) classes as:
$$property(Valve Label block->Size)$$
which will produce 4” 4” 3” for each of the valves
The result will be
![](../__attachments/86999041/image-20230510-153914.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Class definition for PIP GATE VALVE or for PIP GATE VALVE(CLOSED)
![](../__attachments/86999041/image-20230510-154041.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Class definition for PIP GLOBE VALVE
To generate this type of token using the Property Token Builder first select a block belonging to the source class in AutoCAD (or set that class as “Seeked Class” in the window, then set the following window configuration:
![](../__attachments/86999041/image-20230518-145224.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Fixed Source Property Acquisition Token
This is used when absolutely any destination block will go to the exact same source block to read a specific property from. These tokens are not part of any competition rounds which decide which sources are assigned to which destinations. These are tokens that can be used as shared among multiple destinations.
This token follows the pattern:
$$fix(<long source block id>-><AutoCAD Attribute> )$$
This token is automatically generated from any of the other Property Acquisition Tokens described until now. However, if you want you can create them by yourself, you need to use as block id the Handle value of the source in AutoCAD.
Manually create the token:
select the block you want as a source in AutoCAD
run the command LIST
copy the Handle value (it is a hexadecimal number)
convert the number from hexadecimal to decimal number, and this is the result.
To generate this type of token using the Property Token Builder first select a source block, then set the following window configuration:
![](../__attachments/86999041/image-20230518-145507.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Nearby Text Acquisition Token
This is the scenario when the source for building information is of type Text or MText
This token follows the pattern:
$$text(<regex - regular expression>)$$
AseptSoft will look within the drawing for the closes Text which matches the regular expression, and use its whole value to build the information.
Example:
![](../__attachments/86999041/image-20230510-154341.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
The Size of the reducer is given by this Text
$$text(\d+”x\d+”)$$
which will identify any text of form 3”x4” or 1”x5” or 20”x49” or so on.
We use .Net regular expressions for identification.
For more specific expressions regarding specific types of text matches, refer to https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference or contact us to help you build your environment.
To generate this type of token using the Property Token Builder first set the following window configuration:
![](../__attachments/86999041/image-20230518-145926.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
In the “Existing matches” list you will see all the available text values in the drawing which match the given regex expression. Then start editing the regex expression to match exactly the desired values:
![](../__attachments/86999041/image-20230518-145953.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
one “intruder” value. We must continue to specify the regex until only the true results are matching
Now our regex is completed:
![](../__attachments/86999041/image-20230518-150116.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Fixed Text Acquisition Token
This is used when absolutely any destination block will go to the exact same source text to read from. These tokens are not part of any competition rounds which decide which sources are assigned to which destinations. These are tokens that can be used as shared among multiple destinations.
This token follows the pattern:
$$fix(<long source block id> )$$
This token is automatically generated from Nearby Text Acquisition Tokens described before. However, if you want you can create them by yourself, you need to use as block id the Handle value of the source in AutoCAD.
Manually create the token:
select the text you want as a source in AutoCAD
run the command LIST
copy the Handle value (it is a hexadecimal number)
convert the number from hexadecimal to decimal number, and this is the result.
To generate this type of token using the Property Token Builder first select a text in AutoCAD in the window, then set the following window configuration:
![](../__attachments/86999041/image-20230518-150821.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Tag Source filtering
When defining the Tag-Build in the class definition, you might need to add specific constraints. This is done using bound properties. You can define bound properties only to the properties which ends in “-Build”. It generally works with every property (Like “Size-Build“, “Name-Build”, “Phenomenon-Build” and anything you define. But for simplicity we will exemplify on “Tag-Build”
Constraint | Description | Build | Example |
---|---|---|---|
Tag-Layers | Specify which are the layers to look in for sources of information | Enumerate the layers separated by comma (,) or semicolon (;) and as many spaces in between | 0, Process ; TagsLayer |
Tag-Distance | Specify the maximum distance at which the source of information can be | Number written in local culture (point vs comma). Represents the AutoCAD distance in the current space (the same as the length of a line between the two points. | 12 |
Tag-Distance Method | Which distance evaluation method to be used when determining the closest source. If this property is not specified, Tag-Build will be using the Center case. Center = evaluate distance between the centres of the two objects Closest = evaluate the distance between the closest points to each other on the two objects. When creating this property it is recommended to make it of type SelectionList, and use the list “Distance Methods (READONLY)” ![]() | Either “Center” or “Closest” | Closest |
Examples for the constraints above:
![](../__attachments/86999041/image-20230511-174815.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Tags and properties building
When the classes are defined in your environment, and you want AseptSoft to execute a PID search to identify and Assign the Tags and other properties, simply save your PID (with the classes definitions you just created) and then re-start AutoCAD. When the PID will be open the next time, AseptSoft will perform a scan of the entire PID to look for sources of information to satisfy the requests of each block.
Classification
Classify as Control
![](../__attachments/86999041/image-20230510-114156.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
![](../__attachments/86999041/image-20230510-142204.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
To specify that the selected Class is a Valve, first check the “Control” radio button. Then set the Control Type to “Valve”. Alternatively, chose “Tank”, or “Pump” or create your own types. These types will make the states with the same Usage visible when working in a module.
Classify as Instrument
![](../__attachments/86999041/image-20230523-052559.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
As shown in the Type/#(TargetObject.Type) attribute, AseptSoft should classify this Asset as an Instrument that measures pressure.
To indicate that to AseptSoft, select the block reference, open the Class Properties in AseptSoft, and classify it as an Instrument, then set the “Phenomenon-Build” property as required:
![](../__attachments/86999041/image-20230523-053249.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
Classify as Source
![](../__attachments/86999041/image-20230116-103544.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)
As shown in the SourceContent attribute, AseptSoft should classify this Asset as a Sourcethat generates for Fluidstream Simulations the ‘Purified Steam’ Flow State.
To indicate that to AseptSoft, select the block reference, open the Class Properties in AseptSoft, and classify it as a Source, then set the “Phenomenon-Build” property as required:
![](../__attachments/86999041/image-20230523-053355.png?inst-v=e72cc8f7-e4da-4610-8de3-f3411deb87b7)