Accessing Plant 3D Support Properties in Ortho Drawings via .NET API

Accessing Plant 3D Support Properties in Ortho Drawings via .NET API

jovan.maharaj
Enthusiast Enthusiast
136 Views
4 Replies
Message 1 of 5

Accessing Plant 3D Support Properties in Ortho Drawings via .NET API

jovan.maharaj
Enthusiast
Enthusiast

Hi Everyone

 

I’m developing a Plant 3D plugin (C# / .NET 4.8) for ortho drawings. The challenge is accessing support properties (e.g. size, spec, insulation) once the ortho view is generated.

 

In the model, I can get this information via DataLinksManager and PnP tables. But in ortho drawings, the geometry is just plain AutoCAD entities—no RowIds or obvious link back to the Plant 3D database. I am suspicious of the *U+Unique number that the blocks are named with, but i have no way to verify this. One idea is to create a “probe” annotation scheme, capture the block, read its attributes, then erase it. That works, but feels like a workaround.

 

My questions:

 

Is there a supported way to resolve an ortho entity (e.g. support) back to its Plant 3D object or RowId, so I can query DataLinksManager?

 

If not, is there another recommended approach for retrieving Plant properties in ortho drawings programmatically?

 

Has anyone successfully hooked into the ortho pipeline or annotation placement routines for this?

 

Thank you in advance.

Any pointers (docs, sample code, SDK references) would be greatly appreciated.

0 Likes
137 Views
4 Replies
Replies (4)
Message 3 of 5

jovan.maharaj
Enthusiast
Enthusiast

This is perfect, thanks alot!!!

 

Would you happen to know if there is way to avoid the model needing to be opened?

Or if its possible to read  what model was being used in the ortho generation? So that i can temporarily open it as a read only then close it?

0 Likes
Message 4 of 5

jabowabo
Mentor
Mentor

The ortho block xdata contains everything you need to find the source DB item without opening the source drawing. You'll need to snoop around a bit to find out where it is and how to use it.

Message 5 of 5

jovan.maharaj
Enthusiast
Enthusiast

 

This is what i have tried so far, but still no luck:

 

  1. Handle Resolver in Model Drawings

    • Wrote a ProjectHandleResolver to iterate DWGs, find entities by handle, and resolve their RowId + properties.

    • Works, but requires opening source drawings → extremely slow and not the approach I want.

  2. DataLinksManager (DLM) Approach

    • Used GetLinks() and GetRelatedRowIds() on ortho block references.

    • Always returns HasLinks = False in ortho drawings.

  3. RowId Direct Retrieval

    • Some entities expose a RowId in model space, but ortho blocks don’t give it back.

  4. XData Inspection Attempts

    • Dumped XData from every single entity(paper space and model space) in the ortho drawing and source drawing, to compare and find a relationship, but format unclear.

    • Suspect the needed GUID/RowId/PnPID is embedded here, but I don’t know how to parse it.

    • If anyone would like the C# code for the xdata dump, please let me know.
  5. FOTM Command Experiments (using the link provided above)

    • On supports in model space: FOTM shows full Plant Data (RowId, Size, Spec, Desc, PnPClassName, PnPGuid, etc.).

    • On ortho blocks: we only get BlockReference info, no linked Plant data.

Where i need guidance:

 

  • Where exactly in ortho block XData is the Plant 3D link stored?
    (PnPID, GUID, RowId, or some other token?)

  • Is there a Plant 3D API call that decodes this, or do we need to parse the XData manually?

Thank you 🙂

0 Likes