.NET

Reply
Valued Mentor
ralstogj
Posts: 609
Registered: ‎10-01-2006
Message 1 of 4 (410 Views)

How do you save a layer snapshot with a view

410 Views, 3 Replies
04-30-2013 02:26 AM

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/
Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 2 of 4 (391 Views)

Re: How do you save a layer snapshot with a view

04-30-2013 06:58 PM in reply to: ralstogj
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.
Valued Mentor
jeff
Posts: 331
Registered: ‎05-12-2009
Message 3 of 4 (387 Views)

Re: How do you save a layer snapshot with a view

04-30-2013 07:50 PM 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
Valued Mentor
ralstogj
Posts: 609
Registered: ‎10-01-2006
Message 4 of 4 (373 Views)

Re: How do you save a layer snapshot with a view

05-01-2013 01:44 AM 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/
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.