Hi,
how can I get the parameters of the project in C# code.
Like in this video at 0:40
https://www.youtube.com/watch?v=yiiOzfSNn-M
The access to the edited document parameters works.
howto get project properties or parameters
Moderators: remi77, jacs, Daniel
-
- Master Corporal
- Posts: 39
- Joined: Fri Oct 02, 2009 9:46 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 7.8
- Location: Germany
howto get project properties or parameters
Last edited by cam on Fri Jun 24, 2016 2:05 pm, edited 1 time in total.
Greetings
Chris
Chris
- JuP
- Major
- Posts: 169
- Joined: Tue Sep 09, 2014 5:45 pm
- TopSolid Module: TopSolid'Steel
- TopSolid Version: 7.14
Re: howto get project properties or parameters
Hello,
It's in vb.net but the idea is the same:
After that, use Pdm methods:
TopSolidHost.Pdm.GetDescription(ActiveProjectID)
Get name, manufacturer ...
You can also work in the project document and get all parameters (using Parameters.GetParameters).
It's in vb.net but the idea is the same:
Code: Select all
TopSolidDesignHost.Connect()
Dim ActiveDocumentId As DocumentId
ActiveDocumentId = TopSolidHost.Documents.EditedDocument
Dim ObjectId As PdmObjectId
ActiveDocumentObjectId = TopSolidHost.Documents.GetPdmObject(ActiveDocumentId )
Dim ActiveProjectID As PdmObjectId
ActiveProjectID = TopSolidHost.Pdm.GetProject(ActiveDocumentObjectId )
TopSolidHost.Pdm.GetDescription(ActiveProjectID)
Get name, manufacturer ...
You can also work in the project document and get all parameters (using Parameters.GetParameters).
-
- Master Corporal
- Posts: 39
- Joined: Fri Oct 02, 2009 9:46 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 7.8
- Location: Germany
Re: howto get project properties or parameters
Hello,
thank you very mutch.
Now it works well.
Fine thing.....
thank you very mutch.
Now it works well.
Fine thing.....
Greetings
Chris
Chris
-
- Master Corporal
- Posts: 49
- Joined: Tue Sep 29, 2015 2:48 pm
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
Re: howto get project properties or parameters
just in addition, for getting/modifying customer properties (inside the project) you have to use the code given by system info, like "$TopSolid.Kernel.TX.Properties.DeliveryDate" or so.
i've created a base class called File then i created all other classes (cam files, project files, draft files, etc) with they common properties (get/set).
i've created a base class called File then i created all other classes (cam files, project files, draft files, etc) with they common properties (get/set).
- JuP
- Major
- Posts: 169
- Joined: Tue Sep 09, 2014 5:45 pm
- TopSolid Module: TopSolid'Steel
- TopSolid Version: 7.14
Re: howto get project properties or parameters
Yes it's the best way I think ! Thanks !gmanucci wrote:just in addition, for getting/modifying customer properties (inside the project) you have to use the code given by system info, like "$TopSolid.Kernel.TX.Properties.DeliveryDate" or so.
i've created a base class called File then i created all other classes (cam files, project files, draft files, etc) with they common properties (get/set).