Trying to create PropertySetDefinition

Trying to create PropertySetDefinition

naoki.yanagisaki
Explorer Explorer
2,206 Views
7 Replies
Message 1 of 8

Trying to create PropertySetDefinition

naoki.yanagisaki
Explorer
Explorer

Hi, I'm trying to create Civil3D PorpertySetDefinition with c#.

But faced in some trouble. Code is Below. Please give me advice.

 

//---------------------------------

var doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

var db = doc.Database;

var propSetDefName = "MyCustomProp";

var propSetDef = new PropertySetDefinition();

propSetDef.SetToStandard(db);

propSetDef.SubSetDatabaseDefault(db);

propSetDef.Description = "This is sample description";

 

var appliedTo = new StringCollection();

appliedTo.Add("");                                   // <- I want to define SOLID3D, but I don't know the word.

propSetDef.SetAppliesToFilter(appliedTo,false)

0 Likes
Accepted solutions (1)
2,207 Views
7 Replies
Replies (7)
Message 2 of 8

hosneyalaa
Advisor
Advisor
Accepted solution
Message 4 of 8

hippe013
Advisor
Advisor

This is what I get from the filter when set to apply to Solid 3D. 

 

"AcDb3dSolid"

Message 5 of 8

naoki.yanagisaki
Explorer
Explorer

Thank you.

I was helpful.

Trouble is solved by below code.

RXObject.GetClass(typeof(Solid3d)).Name       // I can get "AcDb3dSolid" by this code.

0 Likes
Message 6 of 8

naoki.yanagisaki
Explorer
Explorer
That's good.
My trouble was solved by "AcDb3dSolid"
0 Likes
Message 7 of 8

Ta7a
Enthusiast
Enthusiast
Hello,

in which namespace exist the PropertySetDefinition class , as I can't access it in my solution
0 Likes
Message 8 of 8

naoki.yanagisaki
Explorer
Explorer

In order to use "PropertySetDefinition" class, you need to add some dll to solution.

I used below dll. They all are located in "C:\Program Files\Autodesk\AutoCAD 2021"

accoremgd     

acdbmgd

acmgd

AecBaseMgd

AeccDbMgd

AecPropDataMgd

AecUIWindows

 

PropertySetDefinition refer AecPropDataMgd. And namespace is "Autodesk.Aec.PropertyData.DatabaseServices"

0 Likes