How do you save a layer snapshot with a view

How do you save a layer snapshot with a view

ralstogj
Collaborator Collaborator
1,639 Views
3 Replies
Message 1 of 4

How do you save a layer snapshot with a view

ralstogj
Collaborator
Collaborator

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/
0 Likes
1,640 Views
3 Replies
Replies (3)
Message 2 of 4

DiningPhilosopher
Collaborator
Collaborator
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.
0 Likes
Message 3 of 4

jeff
Collaborator
Collaborator

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
0 Likes
Message 4 of 4

ralstogj
Collaborator
Collaborator

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/
0 Likes