AutoCAD Plant 3D General DIscussion

AutoCAD Plant 3D General DIscussion

Reply
Active Contributor
26 Posts
0 Kudos
Registered: ‎07-05-2012
Post 1 of 2

Accessing weight and description properties of P3D entities using the API

147 Views, 1 Replies
09-04-2012 03:13 AM

Hello, 

I'm trying to access the weight and description of entities in a plant 3d model (pipes, connectors etc) using the api, but after scouring through the sdk docs and google, i still have noe clues left on where to find them. 

My code so far is this:

Using trans As Transaction = _sourceDB.TransactionManager.StartTransaction()
    Dim blockTable As BlockTable
    blockTable = trans.GetObject(_sourceDB.BlockTableId, OpenMode.ForWrite)
    Dim record As BlockTableRecord = trans.GetObject(blockTable(BlockTableRecord.ModelSpace), OpenMode.ForRead)
    For Each blockId As ObjectId In record
         Dim ent As Entity = trans.GetObject(blockId, OpenMode.ForRead)
         If (TypeOf ent Is Pipe) Then
             Dim pipe As Pipe = ent
             'how do i acccess plant 3d properties here????
         End If
    Next
End Using

 

Any ideas???

 

Regards,

 

Henrik

*Expert Elite*
739 Posts
143 Kudos
Registered: ‎12-04-2009
Post 2 of 2

Re: Accessing weight and description properties of P3D entities using the API

09-04-2012 08:10 AM in reply to: henrik.rudstrom

There is an example of getting an objects properties using the datalinks manager in the Plant SDK.  The weight will be one of the properties.  

 

It won't do you any good, unless you already have filled in the weights in your catalogs.

Dave Wolfe
Isaiah 57:15

ECAD, Inc.
Tips and Tricks on our blog: Process Design, from the Outside

A P3D Authorized Reseller
Plant 3d Wish list: https://plant3d.uservoice.com/
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Plant 3D Category!

The AutoCAD Plant 3D forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!