Message 1 of 17
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I'm trying to make a code that uses property set data written in the drawing objects.
So I have a dwg with one property set definition, and I defined it like this:
And I made it so it applies to pipes. Then I attached it to a pipe in the drawing, and in the properties panel, I can see and edit these values:
So, I have a code that finds all property set definitions in the dwg:
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; Database acCurDb = acDoc.Database;
DictionaryPropertySetDefinitions dpsd = new DictionaryPropertySetDefinitions(acCurDb); foreach (ObjectId id in dpsd.Records) { try { PropertySetDefinition pds = transaction.GetObject(id, OpenMode.ForRead) as PropertySetDefinition; if (pds != null) { foreach (PropertyDefinition pdd in pds.Definitions) { //this is property definition that can be used } } } catch (Exception ex) {
}
}
But, how can I read values from specific entity, if I have Pipe object for instance.
I tried to use using PropertyDataServices.GetPropertyValueExt, but I always get exception, but I did not find any documentation about parameters that go in, so it was shot in the dark.
Thank you
---------------------
Damir Vidakovic
www.studioars.com
Damir Vidakovic
www.studioars.com
Solved! Go to Solution.