.NET

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

How do you save a layer snapshot with a view

364 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 (345 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: 321
Registered: ‎05-12-2009
Message 3 of 4 (341 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: 605
Registered: ‎10-01-2006
Message 4 of 4 (327 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/

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community