Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding
Announcements
We are currently migrating data within this board to improve the community. During this process, posting, replying, editing and other features are temporarily disabled. We sincerely apologize for any inconvenience caused and appreciate your understanding. Thank you for your patience and support.

Plant 3D Isometrics: How do I add a database property to weld block definition.

larry.giroux
Explorer Explorer
1,736 Views
5 Replies
Message 1 of 6

Plant 3D Isometrics: How do I add a database property to weld block definition.

larry.giroux
Explorer
Explorer

I have a weld database outside of Plant 3D that is used for field reporting (a simple mobile CRUD app). I created a C# Plant 3D plugin that sets all welds in the Plant 3D model to a unique ID (I just copied the PnPID to the weld number field). This allows my client to match our database records (which have PnPID in one of the fields) with the model welds. Using this method, we can show weld progress on the model.

 

My question is: How can I force the weld number or the PnPID weld property from the model to be saved as a property of the weld symbol (block) on the isometric drawing? I want to automate the same type of visual progress report on the isometric as we are doing on the model.

 

As far as I can tell, the weld blocks have no data that associates them with anything on the model.

 

Some things I tried that did not work:

 

I added the weld callouts in Isometric settings (just to get the 2D coordinates) but my client is using OUR weld numbers in their records. They want me to create temporary weld callouts that show OUR weld numbers and completion date, WPS, Welder ID, etc. They also want clean drawings for IFC without weld numbers so they want Isometric weld callouts turned off. They want to run a command to view the progress, maybe plot the drawing to PDF  and then exit without saving or run another command to delete the temp callouts.

 

I tried scraping the weld numbers from the source PCF file and mapping them to the iso weld blocks in numerical order but the iso weld blocks do not appear in numerical order of the PnPID.

 

I also tried adding them to the weld blocks in order of appearance. This failed because weld blocks on an iso are not always in the same order as in the source PCF (especially with field welds/field-fit welds).

 

I started creating a matrix of 2D coordinates that were isometrically projected from the 3D weld coordinates and checking which arrangement fits best. This failed because the isometrics are not drawn to scale and there are edge cases where the best fit (shortest 2D distance) is wrong. This is especially true with headers with multiple risers or downcomers.

 

Reading the forums here it seems like iso generation is a black box. Maybe there is something that I am missing? Maybe there are docs on iso generation?

Reply
Reply
0 Likes
Accepted solutions (2)
1,737 Views
5 Replies
Replies (5)
Message 2 of 6

jabowabo
Mentor
Mentor

@larry.giroux wrote:

My question is: How can I force the weld number or the PnPID weld property from the model to be saved as a property of the weld symbol (block) on the isometric drawing? I want to automate the same type of visual progress report on the isometric as we are doing on the model.

 

As far as I can tell, the weld blocks have no data that associates them with anything on the model.

 


The API is not likely to help due to the way isos are generated. You can add the following line to the BOM-ATTRIBUTES section of the Iso.atr file of your iso style to make the PnPID accessible via an Annotation Scheme in the IsoConfix.xml file:

EngineeringItems.PnPID

You can then use this value in a block attribute or simple annotation text. Example (you'll want to modify the filter for welds only):

<ComponentScheme Name="PnPIDTag" AnnotationStyle="Standard" Enabled="true" Grouping="false" Alignment="FlatHorizontal" LeaderStyle="Always" Filter="" Fields="PnPID" />

 

Reply
Reply
0 Likes
Message 3 of 6

larry.giroux
Explorer
Explorer
Thanks for the suggestion, I will try this and report back ASAP.
Reply
Reply
0 Likes
Message 4 of 6

larry.giroux
Explorer
Explorer

Hey @jabowabo ,

 

I tried this out but I am still running into the same issues. This basically just adds weld annotations which I already had. Is there a way to modify the annotation style so that the annotation block is centered on the weld block (no leader) and them make it invisible?

 

I think what I really need is documentation on IsoCofig.xml listing all available options. Not sure if that exists. I don't know why Plant 3D wants this stuff to remain so mysterious.

Reply
Reply
0 Likes
Message 5 of 6

jabowabo
Mentor
Mentor
Accepted solution

@larry.giroux wrote:

I tried this out but I am still running into the same issues. This basically just adds weld annotations which I already had. I did not see where you mentioned that you already had the PnPID annotated.

 

Is there a way to modify the annotation style so that the annotation block is centered on the weld block (no leader) and them make it invisible? I'm not sure if you can make specific annotations centered - I haven't seen anywhere to do this. By default the iso engine tries to find the best location for text automatically.

 

I think what I really need is documentation on IsoCofig.xml listing all available options. Not sure if that exists. This is the most comprehensive thing I've seen: https://villagebim.typepad.com/files/de-mystifying-autocad-plant-3d-isometrics.pdf



@larry.giroux wrote:

How can I force the weld number or the PnPID weld property from the model to be saved as a property of the weld symbol (block) on the isometric drawing? I'm pretty certain this is not possible via the iso engine. You'd need to figure out how to 'inject' this after the iso is created.


A few ideas:

  • You could create an annotation style with a block that has attributes for each property you want to show. I think this is the most direct way to accomplish this but will likely be pretty messy.
  • You could annotate the welds with the just the PnPID and create a routine to query the project database for the rest of the properties you want and automatically insert a block with those properties as attribute values at a location based on the annotations or leader vertices.
  • You could annotate the welds with the PnPID then create an report for each iso with the relevant data using the PnPID as the key value.
Reply
Reply
0 Likes
Message 6 of 6

larry.giroux
Explorer
Explorer
Accepted solution

@jabowabo I mostly used your idea and I did get this to work but I have a few notes. Just wanted to save these here in case someone else has this problem.

 

1) I created a command to get a list of weld numbers from the model and write it to an XML file. This runs with the same command that writes the PnPID of each weld to the `weld number` column.

2) My client doesn't want weld annotations dirtying up their IFC drawings. I added temporary angle (diamond) bracketed weld annotations with NO LEADERS. 

3) When my command to upload the data runs, the plugin saves the location of the weld number tags which it identifies by looking for MTEXT containing angle brackets and a valid weld number. It saves the weld numbers with x and y position to memory.

4) The script then deletes the weld number MTEXT entities from the drawing and prompts the user to save it. It is important to disable weld annotation LEADERS because these are not linked to the weld number MTEXT at all. It seems to me like the iso generation script is meant to be a data-agnostic rendering engine and nothing more.

5) I used something close to this algorithm to modify the weld number coordinates that were saved to memory. This gets them closer to the actual weld position that they belong to. 

https://en.wikipedia.org/wiki/Procrustes_analysis

6) ...and then I associate the actual weld locations (from the weld symbol block objects aka weld dots) with the weld-number nearest to them in my procrustes modified point cloud.

 

There are some edge cases that need to be handled too but this general idea got what I needed done.

 

Anyway, thanks for the help! I was totally spinning my tires and you got me on the right path.

Reply
Reply
0 Likes