.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Plant 3D 2015: VB.NET code direction

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
dennis
685 Views, 2 Replies

Plant 3D 2015: VB.NET code direction

I am trying to figure out how to access via VB.NET the "Selection List" setup for both the PnID and P3D, buried in the Project Properties / Setup.  The only reference I can find is in the chm Plant SDK 2015: Developer Help, under Plant Project / Se Up Selection Lists and reads:

 

quote

As part of project setup tasks, developers can set up new selection lists or change the values of existing lists.

The new or modified selection lists populate the Class Property Settings data, where the properties of each class (specific component or line) are defined.

Those properties are included in the component behavior when it is placed from the tool palette onto a drawing.

end quote

 

However, no examples are given.  Any one have a bit of code that will point me in the right direction?

2 REPLIES 2
Message 2 of 3
dave.wolfe
in reply to: dennis

Here's a short sample that shows how to access (C#). 

if
(PlantApplication.CurrentProject == null) return; (PipingProject)PlantApplication.CurrentProject.ProjectParts["Piping"]; Project pnid = PlantApplication.CurrentProject.ProjectParts["PnID"]; PnPDatabaseMode current = pnid.Mode; try { pnid.Mode = PnPDatabaseMode.Exclusive; } catch { throw new System.Exception("Unable to modify project setup while other users are in the project."); } string picklistname = "Pipe_Specs"; PnPPicklist specList = pnid.Picklists.Add(picklistname, picklistname); foreach (var s in specs) { specList.Add(s, string.Empty); } pnid.Save();
Dave Wolfe
Isaiah 57:15



Tips and Tricks on our blog: ASTI blog
EXPERT ELITE MEMBER
Plant 3D Wish list
Message 3 of 3
dennis
in reply to: dave.wolfe

Thanks Dave.  I was thinking I needed to check into PickList since my searching through the Object Browser for SelectionList was going nowhere.  I will run your example through a C#2VB Converter and head in that direction.  Thanks again.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost