How to quickly group a large number of objects in AutoCAD?

How to quickly group a large number of objects in AutoCAD?

wogroaGEJMR
Explorer Explorer
249 Views
1 Reply
Message 1 of 2

How to quickly group a large number of objects in AutoCAD?

wogroaGEJMR
Explorer
Explorer

  I am working on creating specific regions on a surface in Civil 3D and assigning number texts to each region. My goal is to group each Region and its corresponding text into a Group object.

However, I have noticed that when the number of Regions exceeds 10,000, the time required for grouping increases exponentially. Through testing, I found that using tr.AddNewlyCreatedDBObject(group, true); causes performance issues because objects accumulate within the transaction, making the operation significantly slower.

But when I remove tr.AddNewlyCreatedDBObject(group, true); from the code, I encounter an eNotOpenWrite error when adding entities to a Group.

 

My Questions:
Is it possible to group entities without using tr.AddNewlyCreatedDBObject?
If not, is there an alternative way to perform grouping efficiently for a large number of objects?

0 Likes
250 Views
1 Reply
Reply (1)
Message 2 of 2

ActivistInvestor
Mentor
Mentor

There may be ways around this but without seeing either the relevant code, or an exception stack Trace at minimum, I really can't tell you much.

0 Likes