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 artifficial system it provides regarding Properties of these shapes and their clases, which can be created, edited and deleted using the Classification group in the Home Ribbon in AutoCAD.
A PID in AutopCAD is mainly built using Block Refferences 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 artifficial intelligence. It can reliably find the Tags and other properties of Block definitions in the PID, and use this to generate the righ 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 simmilar to the first one, and a second one for the PIDs that are simmilar to the second one.
Each computer can host multiple Classes Definitions Environments.
One Environment contains Classes Definitions Properties. This properties define how a class can build up a tag from information placed nearby it 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.

In this Environments, each class can have multiple Atributes, as well as a Control Type proprety.
Tags an other properties automatic Recognition
AseptSoft will look among the Block Refferences for Engineering Items, Instruments and Sources.

Engineering item: Valve

Engineering Item: Tank

Source

Instrument
The classification is done based on the Class Properties and Block properties of each Block Refference 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 refference.
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 refference 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 builded from the Tag-Build Attribute.
AseptSoft analyzes 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 > )$$

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 reffer to it as is, Abc. If the Attribute Tag is #(TargetObject.Type), you can reffer 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 reffer to an Attribute named #(TargetObject.Type) simply write Type. If it happens that the source Block Refference 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 Reffer 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:

This Token wil 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 Refference does not own directly the AutoCAD attributes needed to build information, but it is known to have another Block Refference 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 splitted 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 Refference which is relevant for searching information within.
The <AutoCAD Attribute> component defines which is the Attribute in that Block Refference which must be extracted to build information from.
The <AutoCAD demanded Attribute> component specifies that AseptSoft must chose a source Block Refference which defines that Attribute. Block Refferences 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:


Valve Label block defines the Attributes to build Tag and Size from
In this scenario multiple valves have their tags as Block Refferences 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 refferences of class “Valve Label block”, as DIFFERENT blocks than the valves themselves:

However, the red Valve (CV 101) is of type PIP GLOBE VALVE, and has the tag more far away, also as a block refference of type Field Mounted Discrete.

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 sa 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

Class definition for PIP GATE VALVE or for PIP GATE VALVE(CLOSED)

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:

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. This 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:
1. select the block you want as a source in AutoCAD
2. run the command LIST
3. copy the Handle value (it is a hexadecimal number)
4. 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:

Nearby Text Acquisition Token
This is the scenario when the source for building infromation 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 it’s whole value to build the information.
Example:

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, reffer 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:

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 exactyl the desired values:

one “intruder” value. We must continue to specify the regex until only the true results are matching
Now our regex is completed:

Fixed Text Acquisition Token
This is used when absolutely any destination block will go to the exact same source text to read from. This 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:

Tag Source filtering
When defining the Tag-Build in the class definition, you might need to add specific contraints. This is done using binded properties. You can define binded 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 centers of the two objects Closest = evaluate the distance betwen 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:

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


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 an module.
Classify as Instrument

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 refference, open the Class Properties in AseptSoft, and classify it as an Instrument, then set the “Phenomenon-Build” property as required:

Classify as Source

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 refference, open the Class Properties in AseptSoft, and classify it as a Source, then set the “Phenomenon-Build” property as required:
