TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Gael on June 04, 2009, 02:11:38 PM

Title: code to open a series of drawings and freeze a layer
Post by: Gael on June 04, 2009, 02:11:38 PM
For all you wizards out there.....

I am not a code writer by any stretch....

I need a routine that will open a set of drawings, freeze a layer or 2, save and close.

I would also like one to do the reverse too....

Basically we have a preliminary stamp in all our drawings that is required to be on unless we go to plot finals.  I am don't want to open a 100 drawings to freeze the layer.  

I typically work through a sheet set so I do a batch plot.

Any suggestions?

I figure it is already covered somewhere in this forum, but I didn't see it.

Thanks,
Gael
Title: Re: code to open a series of drawings and freeze a layer
Post by: MP on June 04, 2009, 02:15:19 PM
Take advantage of the swamp's most excellent search function (using terms like "batch objectdbx") applicable solutions have been posted MANY MANY times by several different authors. :)
Title: Re: code to open a series of drawings and freeze a layer
Post by: T.Willey on June 04, 2009, 02:16:39 PM
Take advantage of the swamp's most excellent search function (using terms like "batch objectdbx") applicable solutions have been posted MANY MANY times by several different authors. :)

I was thinking this, but then I was wondering what would happen if that layer was current in the drawing before saving, and the you freeze it.  Would that make the drawing need to be recovered?  Or is there a way to check if the layer was current?
Title: Re: code to open a series of drawings and freeze a layer
Post by: ronjonp on June 04, 2009, 02:33:05 PM
Take advantage of the swamp's most excellent search function (using terms like "batch objectdbx") applicable solutions have been posted MANY MANY times by several different authors. :)

I was thinking this, but then I was wondering what would happen if that layer was current in the drawing before saving, and the you freeze it.  Would that make the drawing need to be recovered?  Or is there a way to check if the layer was current?

I've frozen the current layer before using objectdbx and did not need to recover the dwg.
Title: Re: code to open a series of drawings and freeze a layer
Post by: T.Willey on June 04, 2009, 02:35:14 PM
Take advantage of the swamp's most excellent search function (using terms like "batch objectdbx") applicable solutions have been posted MANY MANY times by several different authors. :)

I was thinking this, but then I was wondering what would happen if that layer was current in the drawing before saving, and the you freeze it.  Would that make the drawing need to be recovered?  Or is there a way to check if the layer was current?

I've frozen the current layer before using objectdbx and did not need to recover the dwg.

Thanks for that Ron.
Title: Re: code to open a series of drawings and freeze a layer
Post by: deegeecees on June 04, 2009, 03:34:10 PM
Take advantage of the swamp's most excellent search function (using terms like "batch objectdbx") applicable solutions have been posted MANY MANY times by several different authors. :)

I was thinking this, but then I was wondering what would happen if that layer was current in the drawing before saving, and the you freeze it.  Would that make the drawing need to be recovered?  Or is there a way to check if the layer was current?

Set the current layer to "0", then freeze the layer in question.
Title: Re: code to open a series of drawings and freeze a layer
Post by: T.Willey on June 04, 2009, 03:47:30 PM
Take advantage of the swamp's most excellent search function (using terms like "batch objectdbx") applicable solutions have been posted MANY MANY times by several different authors. :)

I was thinking this, but then I was wondering what would happen if that layer was current in the drawing before saving, and the you freeze it.  Would that make the drawing need to be recovered?  Or is there a way to check if the layer was current?

Set the current layer to "0", then freeze the layer in question.

Not sure how you would do that with ObjectDBX.  There might be a property of the document for ActiveLayer, but I didn't investigate, which doesn't seem needed after Ron's post.
Title: Re: code to open a series of drawings and freeze a layer
Post by: deegeecees on June 05, 2009, 11:05:27 AM
True, but I was just giving my thoughts on how I would handle it. If I couldn't get it in ODBX, then I'd use the "Batch Anything" widget.