Quantcast
Channel: AutoCAD PNID – Process Design, from the Outside
Viewing all articles
Browse latest Browse all 38

Automatic Line Lists from AutoCAD P&ID

$
0
0

In 2016, we have the ability to debug scripts in the report creator. Recently I was able to use that to develop a report that shows a true piping line list. It does function a little different from the stock line list and the stock line summary list in that it requires grouping line segments and line groups. In this post I’ll show how to use the report to create your piping line list. In a future post, I’ll show how to modify an existing line list report to use the features provided in our template.

Automatic P&ID Line List (11 downloads)

Here are the key concepts that are used to create the report template.

  • Use calculated properties to group line segments with their line group
  • Use of a custom parameter to create a calculated line number tag
  • Use a custom property (IsMainLineSegment) to allow users to identify the main line segment.
  • Use custom properties (EquipmentFrom, EquipmentTo, EquipmentFromManual, EquipmentToManual) to allow the user to manually override Equipment From and Equipment To values.
  • Use a custom parameter (LineNumber_CombineRelatedDrawings) to indicate whether all the related drawings should be shown, or just one.

Grouping Line Properties

In order to get the proper data from related line segments, both the line groups and line segments classes have to be used as a data source for the report. The downside of this is that in order to display properties, both the line segments and the line group must contain the same value for that property. To make this work, you will have to create additional acquisition properties on the line segments class.

For example, in order to get the service into the report, you have to create the Service property on the line segment (the name doesn’t matter).

If creating the Acquisition property in an existing project, you have to use the command, PLANTREFRESHACQPROPERTY (new in 2016), which will update the property value.

Once the new property is in place, you have to add a calculated field.

For the expression use a statement like this: Iif(IsNullOrEmpty([PipeLineGroup_Service]),[Pipe Line Segments_Service] , [PipeLineGroup_Service])

Basically, this expression checks to see if the Pipe Line Group service property is blank, and if it is, it uses the pipe line segments service property). This expression allows us to create a critical shared property between the line groups and line segments that matches.

A similar procedure would be used for any property you want to display. First create the property in the line group if it’s not present, second create an acquisition property in the line segments class, and then third, create the calculated field in the report template.

Custom Line Number Tags

The report template has a custom parameter, LineNumberFormat, to allow you to define a line number format based on line group and line segment properties. Because the line group and line segments have to share the value, the line tag format has to be calculated.

The report will pick a size/spec from the line segments and use that in combination with the line group properties to create a line tag format. If you prefer to specify the size/spec for a line, use the IsMainLineSegment property from the next section.

To customize the line tag format, you can modify the lookup settings for the LineNumberFormat.

The list shows the properties to be used in the line tag format as well as the separators.

Using the custom line number tag makes a report that looks like this:

2016-03-31_12-29-52

Setting Main Line Segments

Another hurdle this report template gets around is figuring out the nominal size/spec. Instead of having to fill out those properties on the line segment, the report looks for one of the line segments to have the IsMainLineSegment property checked. If no line segment has the value checked, then the first segment is returned. Typically the first segment would be the first one drawn. This makes it easier to have one size reported consistently in your line list.

Implementation:  To allow using this feature on an existing project, add a new boolean property to the Pipe Line Segments called IsMainLineSegment.

Automating Equipment From and Equipment To

The “equipment from” and “equipment to” properties will be filled out automatically, which will work for most scenarios. However, occasionally you may want to manually modify the value. For example, it would be clearer to say “TO TANK FARM” than to TK-001, TK-003, and TK-004. The report allows this by utilizing check boxes. If the box is checked the report will use the manual property for the corresponding equipment property.

 

Implement:  To allow using this feature on an existing project, add a string property EquipmentFrom, a boolean property EquipmentFromManual, a string property EquipmentTo, and a boolean property EquipmentToManual.  I recommend using the order given so that the user can check the manual box beside the corresponding property.

Viewing Related Drawings

Because line groups sit outside of the class structure for Engineering Items, they have no drawing association. In addition, they can be associated with line segments on several drawings. Our report template will automatically make a list of the drawings that the line group appears on. Due to software limitations, we can’t at this time only return the first and the last drawing which would be preferred. Here is what the default value in our template returns.

Some clients prefer to see just one drawing. For those, there is a parameter LineNumber_CombineRelatedDrawings that can be toggled.

Here’s the output with LineNumber_CombineRelatedDrawings set to No.

A quick side note, every time the report creator launches the report, you may get an error that says the report creator has stopped working.  Hit close program and then the report will run as normal.  This only occurs once every time the report creator exe is launched. We will keep digging to try to find the source of the error.

2016-03-31_12-30-42


Viewing all articles
Browse latest Browse all 38

Trending Articles