live debug on AutoCAD

live debug on AutoCAD

a.kouchakzadeh
Advocate Advocate
349 Views
1 Reply
Message 1 of 2

live debug on AutoCAD

a.kouchakzadeh
Advocate
Advocate

Hi every body

I was wondering if there is anyway to trach changes live on AutoCAD screen while pressing F10?

similar to VBA

I tried out  doc.SendStringToExecute("REGENALL ", true, false, true) &  Autodesk.AutoCAD.Internal.Utils.FlushGraphics();

but non of them were effective. nothing will change unless the program reaches to its end.

for example, I got a foreach loop which contains as entity.erase command.

but I can not see the live change unless the program reaches to the transaction.commit();

Edit:

can any one guide me what is wrong with this?

 

foreach (ObjectId obj in objallID)
{
Entity ent = trs.GetObject(obj, OpenMode.ForWrite) as Entity;
ent.Visible=false;
}

 

and how can I convert an objectID collection to a selection set and vice versa? 

or an object ID to an entity?

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

a.kouchakzadeh
Advocate
Advocate

I noticed whats going on has to do some thing with the transaction. I assume nothing will change in the drawing area unless the transaction has been commited.

0 Likes