.NET

Reply
Active Contributor
harryliu3140
Posts: 46
Registered: ‎10-29-2009
Message 1 of 2 (152 Views)
Accepted Solution

when Entity.isModified is true

152 Views, 1 Replies
11-20-2013 03:11 PM

Hi,

 

I StartTransaction to modify a document, to freeze layers. Before commit the transaction I want to thaw one of the layers while it's property of IsModified is true. I can't thaw it. IsModified is readonly. How can I thaw the layer before commit the transaction? I can't abort the transaction as other layers I don't want cancel.

 

In ACAD you can thaw a layer in the process of freezing by undo. I need to start and commit for each layer?

Regen after Commit the layer show. I need regen before commit.

 

Search in the posts found Tony's answer: http://forums.autodesk.com/t5/NET/Regen-layer/m-p/1615232/highlight/true#M3151

 

Reference AcMgdInternal.dll, and then use:

   Autodesk.AutoCAD.Internal.LayerUtilities.RegenLayers(
ObjectId[] layers, int regenPending);

The first parameter is an array contianing the ObjectId's
of the LayerTableRecords for the layers to be regenerated.

For the second parameter, pass the result of this
static property on the same class:

   Autodesk.AutoCAD.Internal.LayerUtilties.RegenPending;

 

Thanks, Tony

Active Contributor
harryliu3140
Posts: 46
Registered: ‎10-29-2009
Message 2 of 2 (137 Views)

Re: when Entity.isModified is true

11-20-2013 03:46 PM in reply to: harryliu3140

Regen after Commit the layer show. I need regen before commit.

 

Search in the posts found Tony's answer: http://forums.autodesk.com/t5/NET/Regen-layer/m-p/1615232/highlight/true#M3151

 

Reference AcMgdInternal.dll, and then use:

   Autodesk.AutoCAD.Internal.LayerUtilities.RegenLayers(
ObjectId[] layers, int regenPending);

The first parameter is an array contianing the ObjectId's
of the LayerTableRecords for the layers to be regenerated.

For the second parameter, pass the result of this
static property on the same class:

   Autodesk.AutoCAD.Internal.LayerUtilties.RegenPending;

 

Thanks, Tony

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.