How do you read geometric constraints from the Assoc2dConstraintGroup in C# or VB?
Go to Solution.
Here is a c# sample that illustrates how to get started:
public void DumpConstraints()
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
ObjectId networkId = AssocNetwork.GetInstanceFromObject(
if (networkId == ObjectId.Null)
using (Transaction Tx =
using (AssocNetwork network =
OpenMode.ForRead, false) as AssocNetwork)
foreach (ObjectId actionId in network.GetActions)
if (actionId == ObjectId.Null)
DBObject obj = Tx.GetObject(
//ed.WriteMessage("\n - Action: " + obj.ToString().Remove(0, 34));
Assoc2dConstraintGroup group = obj
//... do something ...
I can't thank you enough for helping me. I had given up and was working on an alternate/not so elegant solution. Thank you SO very much!
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.