.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Regen layer

6 REPLIES 6
Reply
Message 1 of 7
fmarcelino
888 Views, 6 Replies

Regen layer

Hi,

I wonder if it's possible to regen only one layer.

Thanks in advance for your attention,
Filipe Marcelino
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: fmarcelino

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;

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5145597@discussion.autodesk.com...
Hi,

I wonder if it's possible to regen only one layer.

Thanks in advance for your attention,
Filipe Marcelino
Message 3 of 7
fmarcelino
in reply to: fmarcelino

Thanks for your response Tony, but I can't find that DLL. Shouldn't be in 'inc' folder of the ObjectARX?

Thanks,
Filipe Marcelino
Message 4 of 7
Anonymous
in reply to: fmarcelino

Have a look in the ACAD root folder

///
wrote in message news:5146847@discussion.autodesk.com...
Thanks for your response Tony, but I can't find that DLL. Shouldn't be in 'inc' folder of the
ObjectARX?

Thanks,
Filipe Marcelino
Message 5 of 7
Anonymous
in reply to: fmarcelino

Will be obvious soon enough-I'm new to the managed wrappers and objectarx although not to .NET.

I can't even guess how many hours I've spent trying to get a block with subentities on layer X to change color like everything else on the layer does when updatescreen() is called without having to resort to using regen(AcAllVP).. Thanks soooooooooooo much!!!

Now... Since AcMgdInternal.dll is not mentioned at all in the SDK, how should I go about discovering this and any other information I might need in the future that 'desk has ommitted? Message was edited by: Somepin

Also, If you have time can you give me some code describing how to "regen" (in whatever form it exists) an object/layer/the drawing? These blocks i created were just to feel up the object model. They consist of an "X" (2 lines). In one block, the lines are on layer 0 and in the other they are on layer 1. Both blocks are inserted to layer 0 and then both copied onto layers 1,2,3,etc. When layer "1" for instance is changed some (but not all) of the blocks completely change colors as desired, and of course any non-complex objects change as well. Without Internal.dll, does the involve iterating, and if so, through what db/dic/XX? THANKS again soooo much!
Message 6 of 7
harryliu3140
in reply to: fmarcelino

You don't need to reference AcMgdInternal.dll. The Autodesk.AutoCAD.Internal may be included in AcDbMgd or AcMgd.

 

Message 7 of 7
fieldguy
in reply to: harryliu3140

Just to clarify - Autocad 2009 requires a reference to AcMgdInternal.dll.  2012 does not.  I don't know when then APIs changed.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost