AutoCAD Plant 3D Forum
Welcome to Autodesk’s AutoCAD Plant 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Plant 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing weight and description properties of P3D entities using the API

1 REPLY 1
Reply
Message 1 of 2
henrik.rudstrom
304 Views, 1 Reply

Accessing weight and description properties of P3D entities using the API

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

1 REPLY 1
Message 2 of 2

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



Tips and Tricks on our blog: ASTI blog
EXPERT ELITE MEMBER
Plant 3D Wish list

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost