C# -- access project properties


I am writing a little tool (C#) to edit the properties of our Solid Edge files. While editing the normal properties and the custom properties is not a big deal I am struggling with the "project properties", especially the document number (see attachment).

This is how I read the custom properties:

foreach (DSOFile.CustomProperty property in myFile.CustomProperties)
                switch (property.Name)
                        case "Titel englisch":
                                tmpTitelEnglisch = property.get_Value();
                                tmpTitelDeutsch = myFile.SummaryProperties.Title;

and so on. How can I access the project properties? Is there an example?

Thank you in advance


Re: C# -- access project properties

Rather than using the DSO type library, I would recommend using the Solid Edge File Properties Object Library (C:\Program Files\Solid Edge ST8\Program\PropAuto.dll). I don't have any sample code handy at the moment but there are some examples on the SDK website. Specifically, take a look at the PropertyIDs Enumeration. You'll see members like igProjInfoDocNum, igProjInfoProjectName & igProjInfoRevision. You can pass those into the Properties.PropertyByID(PropId as Long) property.

Jason Newell
Applications Architect

Re: C# -- access project properties

and the PropAuto.dll is completely "offline", I mean I don't have to open the files in Solid Edge?

(sorry, just started with C#)



Re: C# -- access project properties

Is there a reason that you don't want to use Solid Edge directly, even without GUI using the -automation parameter? Because with Solid Edge it would be pretty easy...

Re: C# -- access project properties

Well, try to explain it:

We started using Solid Edge in 2003 (guess it was V12 or something like that) and since then we had a frequent change in our design departement. Every new employee had their own opinion how to fill the different properties so it's a mess (nearly 80'000 files) right now. We want to update our PDM system (SMAP 3D) and our Solid Edge system (ST7 right now) to the newest release later this year and our goal is to standardise all the properties to one level (example: We have a property called "surface" and this should be filled with something like "hardened" ... I found over 10 different ways to write "hardened" Smiley Frustrated ).

The way we are doing it right now is to export a HTML table (with the files we would like to rework today -- we don't have the ressources to do it every day), use some self-scripted Excel tools to manually check and revise all the properties before copying them back to our database and refresh it.

This is working fine but as you can imagine, instead of fixing all problems we are creating (to err is human) some new faults. This is the point were my small C# tool should be used. It checks specific properties with lists (GO, NOGO, pre-defined values, etc) and gives me the possibility to correct the missing values again. 


Got everything up and working (just need some tweaks) but I am still messing up with this "document number" problem.

To be honest, I don't know much about the Solid Edge possibilites to do this maybe in an easier way; thought to code a small C# tool is not a big deal.

Hope this explains why I asked this question Smiley Happy