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

How do you save a layer snapshot with a view

3 REPLIES 3
Reply
Message 1 of 4
ralstogj
1006 Views, 3 Replies

How do you save a layer snapshot with a view

Hi

 

I am using this code periously posted at the swamp to save layout views but would also like to save a layer snapshot at the same time as you can with the view command. Does anyone have a code example of how you would to this.

 

http://www.theswamp.org/index.php?topic=42747.0

Regards

Justin Ralston
http://c3dxtreme.blogspot.com/
3 REPLIES 3
Message 2 of 4

None of that stuff is documented, so your only route if you can't find an example is to reverse-engineer what AutoCAD does to achieve the desired result. You would have to examine the objects involved, and see what data is being stored on them, or in some other related object, and write the code to generate the same data.
Message 3 of 4
jeff
in reply to: DiningPhilosopher

Just Added to what was already pointed out,

I think it is stored in the LayerTables's ExtensionDictionary in another dictionary called ACAD_LAYERSTATES

 

The dictionary should contain entries(Xrecords) called ACAD_VIEWS_XXXXXX where XXXXX is the view name.

 

The ResultBuffer returned from the Xrecod Data should contain information about the layers.

 

If you look at the picture the '90' field with a value 10 correlates with a layer that is frozen, or it could pure coincidence

LayerSnapshot.PNG

 

 

 

 

 

You can also find your answers @ TheSwamp
Message 4 of 4
ralstogj
in reply to: jeff

Guys

 

Thanks for the reply but I found some old lsp to do the other half of the problem I was trying to solve here that I should be able to modify with some lsp I already have to save a view with a layersnapshot.

 

It looks like doing it in .net is just to tricky and time consuming at this stage.

Regards

Justin Ralston
http://c3dxtreme.blogspot.com/

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