Class and Block Properties Definitions
Properties Definitions can be defined both for a Class and for a Block. Why do we define at both of these levels, and what is the difference between Class Properties Definitions and Block Properties Definitions, can seem confusing at first sight. But this functionality is a very powerful method that provides flexibility and consistency for the final results.
The only difference between Class Properties Definitions and Block Properties Definitions comes at the Properties Definitions | Property-Build-Attribute.
Class Properties Definitions
The Properties Definitions | Property-Build-Attribute can contain Seeking Tokens or Non-Seeking Tokens, Which once resolved will return the AutoCAD Entity (Text / MText / Block Reference) that contains the value we want to use for our property.
Note: Here might come the question: Why does this system not simply return the Value found at that Entity? Why is it needed to return the Entity, when all we need is that value? The clarifications will follow during the next section, and it’s the main reason why we implemented Block Properties Definitions.
Setting the Class Properties Definitions is done using the Class Properties Definitions Window which you can access through the Home Ribbon differences | Classification panel :
Block Properties Definitions
Once the Seeking Tokens from the Class Properties Definitions have been resolved for one particular Block, the Block Properties Definitions will get a copy of the Class Properties Definition Properties Definitions | Property-Build-Attribute where all the original Seeking Tokens have been replaced by Fixed-IDNon-Seeking Tokens.
Example: The Tag-Build for a class contains a seeking token that says: look around for a Text that begins with “VM-”. That should be your Value. Such a token would look like: $$text(VM-)$$
After evaluating the token for each block of that class, AseptSoft looks around and identifies a text that matches the criteria for each of the blocks of that class. The textes contains the values “VM-1A1”, “VM-1A2”, “VM-1A3”.
The straight-forward implementation would have been to assign this values directly to the Tag of each block. However, if the user goes in the Future to the P&ID and changes the VM-1A1 into a VM-1C1, as we want AseptSoft to update the Tag as well for that particular Valve. Thus a linking between the Text that says “VM-1A1” and the block that uses that Tag needs to be preserved. This is the reason why Block Properties Definitions exists. They hold links between the sources of the Properties, and the Blocks that uses these Properties.
For each of the Block Properties Definitions there will be a Tag-Build, which links them to the text that contains the Tag: First one will be using the fixed-ID non-seeking Token $$fixtext(1234)$$. The other two will also have a fix token linking to the ID of the text that they use.
Finally, the Tag will be extracted from the Block Properties Definitions each time AseptSoft runs
Note: The Block Properties Definitions is updated from the Class Properties Definitions only when the Properties Definitions | Property-Build-Attribute is empty in the Block Properties Definitions
To access the Block Properties Definitions, please use the Block Properties button in the Home Ribbon differences | Classification panel.
Example
For the class “PIP GATE VALVE” we have just set the Tag-Build Attribute is “$$text(VM-)$$”.
In the current drawing, there is one one Block of this class.
For now, the Block has no Property Definition for the Tag Property.
After re-opening the drawing, we will see that the Block has now a Property Definition for the Tag Property, with the value “$$fixtext(12112)$$”, and also a Tag Attribute with the value “VM-1A1”.
If a colleague will edit the VM-1A1 textbox and set it to VM-1C1, upon restart, the Block will still have the Property Definition for the Tag Property with the same value “$$fixtext(12112)$$”, but this time the “Tag” Attribute will have it’s value updated to VM-1C1.
Changing the Tag-Build Attribute for the Class to any other value, will not affect the Block’s Tag-Build or Tag until we remove the “$$fixtext(12112)$$” value in the Tag-Build of the Block.