.NET

Reply
Active Member
MexicanCustard
Posts: 8
Registered: ‎04-11-2011
Message 1 of 1 (84 Views)

Custom Sizes for MvParts

84 Views, 0 Replies
04-23-2011 09:02 AM

How do I add MultiViewParts with custom sizes? I've got a MvPart which is just a cylinder. I have a Diameter and a Height parameter defined in my part as list parameters. It's also flagged for custom sizes.

 

When using:

 

DataExpandedTable exTbl = PartManager.GetPartTable(query, 10);

DataRecord newRec = exTbl.DataRecords[0];

newRec.DataFields.FindByContextAndIndex(Context.GeometryModelParameter, 1).ValueDouble = 10; //change Diameter

 

MultiViewPart mvPart = new MultiViewPart();

mvPart.SetDatabaseDefaults(currDB);

MvPart.SetToStandard(currDB);

PartManager.CreatePartViaRecord(exTbl, newRec, mvPart);

 

Autocad ignores any changes I make to the DataRecord newRec before calling CreatePartViaRecord and inserts the cylinder with the default sizes. I don't want to add additional sizes to the Catalog if I can avoid it. I just want to define custom sizes while adding the cylinder to the database. I can do this manually within the drawing so I'm assuming it can be done via code.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community