AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Query property alteration - Lineweight

0 REPLIES 0
Reply
Message 1 of 1
fieldguy
282 Views, 0 Replies

Query property alteration - Lineweight

I am resurrecting this post in the hopes that someone from autodesk will respond.  I am using Civil 3D 2016.  I know there are workarounds.  Can all of the potential options available in the API be made to work please?  Or, if they will never be made to work, please remove them from the vs object browser.  Maybe this is fixed in 2018?

 

acgis.PropertyAlterationDefinition pad = atsq.PropertyAlteration;

// layer works fine
acgis.PropertyAlteration pa = pad.AddAlteration(acgis.Constants.AlterationType.AlterationLayer);
pa.Expression = "NO-PLOT";

// color works fine
acgis.PropertyAlteration pac = pad.AddAlteration(acgis.Constants.AlterationType.AlterationColor);
pac.Expression = "ByLayer";

// lineweight does not work - this generates a MapException

acgis.PropertyAlteration paw = pad.AddAlteration(acgis.Constants.AlterationType.AlterationLineWeight);

paw.Expression = "ByLayer";
atsq.EnablePropertyAlteration(true);

 

The solution from -kd- is a foreach loop on the query objectidcollection.  There is an easy to build example in this link.

https://forums.autodesk.com/t5/autocad-map-3d-developer/query-propertyalteration-alterationtype-line...

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost