Plant 3D SQLite Database - How are PnPIDs Assigned?

Plant 3D SQLite Database - How are PnPIDs Assigned?

joshuaadams
Advocate Advocate
1,683 Views
5 Replies
Message 1 of 6

Plant 3D SQLite Database - How are PnPIDs Assigned?

joshuaadams
Advocate
Advocate

Hi All,

 

Just wondering how the PnPIDs in the Plant 3D SQLite database are assigned. As there appears to be not logical pattern to me.

 

E.g. I am trying to assign weld numbers to all my buttwelds for a specific drawing in the Plant 3D database. I have sucessfully identified all welds for a specific drawing in my project and assigned numbers to them sequentially according to their PnPID (ordered ascendingly) see screenshot below.

 

PnPID QUERY.png

 

However, when I generate my model, all the weld numbers do not appear in the correct locations on my isometric. They are all jumbled up. See screen below.

 

JUMBLED WELD NUMBERS.png

 

Any ideas how I can get the weld numbers produced in the correct order?

 

Thanks alot for any help in advance!

 

Cheers,

 

Josh

0 Likes
1,684 Views
5 Replies
Replies (5)
Message 2 of 6

lopezjo
Alumni
Alumni
PnPID are assigned at the time of row creation using an auto-numbered column. This means the order of the welds match creation time and not a topological sort.

To order the welds in the order you want, you will need to walk the pipe network. There are APIs for this:

http://adndevblog.typepad.com/autocad/2013/06/walking-a-pipe-in-plant3d.html

Hope this helps.


Jorge Lopez
Software Architect
Autodesk Plant Solutions
Autodesk, Inc.

Message 3 of 6

joshuaadams
Advocate
Advocate

Hi Lopezjo,

 

THanks for the response :).

 

I had suspected this was the case. However, my models are created externally then imported into my plant 3D project. Does this change the way that the PnPID's are assigned?

 

As for using the API this seems like a good way to getting the weld numbers in the order I require. But if I am going to have to go with a programming option I think I will just "walk the pipe system" (good idea btw) using the [PnPDataLinks] table and some simple SQL code in the project database.

 

Cheers,

 

Josh

0 Likes
Message 4 of 6

Anonymous
Not applicable

Hi Lopezjo

 

I'm trying to load a mass number of tags and I'm looking for a way to do it without having to create geometry or blocks to create associated PnPID numbers. In theory, could I add a list of components in my exported database and bring them back in when I import the database back in? Is there a way of creating manual PnPID numbers?

0 Likes
Message 5 of 6

jabowabo
Mentor
Mentor

Pnpid numbers are essentially table row ids and must be unique throughout the database. They are tracked and used in datalinks and defined relationships in various tables. I'm not clear on what your goal is but I don't recommend attempting to create ad hoc new pnpid numbers in the database. It's likely this would corrupt the entire project.

0 Likes
Message 6 of 6

Anonymous
Not applicable

Hi Jason,

Thanks for your response. You could probably create entries in SQLite, but I agree too much risk to corrupt the database.

0 Likes