Author Topic: code to open a series of drawings and freeze a layer  (Read 3671 times)

0 Members and 1 Guest are viewing this topic.

Gael

  • Guest
code to open a series of drawings and freeze a layer
« 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

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: code to open a series of drawings and freeze a layer
« Reply #1 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. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

T.Willey

  • Needs a day job
  • Posts: 5251
Re: code to open a series of drawings and freeze a layer
« Reply #2 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?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: code to open a series of drawings and freeze a layer
« Reply #3 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.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

T.Willey

  • Needs a day job
  • Posts: 5251
Re: code to open a series of drawings and freeze a layer
« Reply #4 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.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

deegeecees

  • Guest
Re: code to open a series of drawings and freeze a layer
« Reply #5 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.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: code to open a series of drawings and freeze a layer
« Reply #6 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.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

deegeecees

  • Guest
Re: code to open a series of drawings and freeze a layer
« Reply #7 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.