Berkay Posted April 11, 2023 Posted April 11, 2023 Hello I am trying imitate the purge action availble in Civil3d 2022 by right clicking on the property set definitions which removes everything. I need to do this using C#. The code that is short and clear is the next code found somewhere, but complains about the function not finding PropertySetDefinitionCollection using (var db = HostApplicationServices.WorkingDatabase) { // Get the propertyset definition collection var psdColl = db.PropertySetDefinitionCollection; // so it can't find PropertySetDefinitionCollection, it does not exist according to visual studio // Purge all the propertyset definitions psdColl.Purge(); } Am I missing something? All dll's should be added: accoremgd.dll, acdbmgd.dll, acmgd.dll, AecBaseMgd.dll, AeccDbMgd.dll. These dll's are in both locations available: 1) C:\Program Files\Autodesk\AutoCAD 2022 2) C:\Program Files\Autodesk\AutoCAD 2022\C3D Does it matter which one you pick? Thank you in advance! Quote
BIGAL Posted April 12, 2023 Posted April 12, 2023 I don't work in C# but do stuff in CIV3D so maybe have you declared DB as the correct CIV3D database it varies for each CIV3D version. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.