Author Topic: Modify drawing without opening them?  (Read 7829 times)

0 Members and 1 Guest are viewing this topic.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Modify drawing without opening them?
« on: December 12, 2006, 02:27:44 PM »
Can this be done?  We do some batch changes that require us to run through 20+ drawings opening up each one making the change then moving on to the next one (we do use a script sort of).  I would like to do some of these things without opening the drawings.?.?  Can anyone give me a push?

Thanks
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

M-dub

  • Guest
Re: Modify drawing without opening them?
« Reply #1 on: December 12, 2006, 02:30:12 PM »
Do you mean you want to make the changes without even creating / using a script?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Modify drawing without opening them?
« Reply #2 on: December 12, 2006, 02:31:59 PM »
Depends what you are doing.  You can do a lot of stuff with ObjectDBX and the ActiveX controls.  Let us know exactly what you want to do, and we can let you know if it is possible.
Tim

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

Please think about donating if this post helped you.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Modify drawing without opening them?
« Reply #3 on: December 12, 2006, 02:57:12 PM »
Well I would like to batch print without opening any drawings.  We also have a version block that get change across the board.

In our typical house we might have 20-40 drawings.  When those drawing get a major change we chagne the version.  We copy the current folder with all the drawing then archive the old one.  It is up to the design team to make sure that all of the drawing get audited, purged and updated versions before we start.  I would like to automate this prosess.

Once the drawings get finished a finial set needs to be printed to get signed.  I would like to print them without opening them.

I had thought about starting a vba app that would allows us to select the things that we want to do the select the directory of drawing to do it to.

Doable??
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

M-dub

  • Guest
Re: Modify drawing without opening them?
« Reply #4 on: December 12, 2006, 02:59:49 PM »
Sorry, one last question / clarification.

Do you not want the drawings to be opened PERIOD, or do you want it to do everything automatically?  In other words, do you want this functionality to be possible on a machine that doesn't even have AutoCAD on it?

Guest

  • Guest
Re: Modify drawing without opening them?
« Reply #5 on: December 12, 2006, 03:15:05 PM »
The last time I checked you couldn't print or xref without actually opening the drawing (that was about 18 mos. ago).  Things may have changed??!?

You could set up a sheet set and publish the drawings in the background, thus allowing you to continue working.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Modify drawing without opening them?
« Reply #6 on: December 12, 2006, 03:20:47 PM »
I don't think you can do what you want in Lisp.  One problem with ObjectDBX is the way it handles attributes and text that are not left justified when you edit the contents.  It will move them.

You can not print, AFAIK, without opening them with Lisp.  I have tried and failed.  I have heard that with VBA, you can set it to print in the background, but I think it still needs to open them.

You can purge with ObjectDBX, but I'm not sure about audit.  It looks like you can audit, at least you can the current drawing, but I'm not sure about using with ObjectDBX.  Correction you cannot audit or purge a drawing opened with ObjectDBX.  You can write your purge style routine to delete blocks and layers, and stuff like that though.  Here is a dump of a drawing opened with ObjectDBX.
Quote
; IAxDbDocument: IAxDbDocument Interface
; Property values:
;   Application (RO) = Exception occurred
;   Blocks (RO) = #<VLA-OBJECT IAcadBlocks 0291e764>
;   Database (RO) = #<VLA-OBJECT IAcadDatabase 02907ce4>
;   Dictionaries (RO) = #<VLA-OBJECT IAcadDictionaries 02918c54>
;   DimStyles (RO) = #<VLA-OBJECT IAcadDimStyles 0291c3a4>
;   ElevationModelSpace = 0.0
;   ElevationPaperSpace = 0.0
;   FileDependencies (RO) = #<VLA-OBJECT IAcadFileDependencies 02906224>
;   Groups (RO) = #<VLA-OBJECT IAcadGroups 028d8074>
;   Layers (RO) = #<VLA-OBJECT IAcadLayers2 028dadd4>
;   Layouts (RO) = #<VLA-OBJECT IAcadLayouts 028d1534>
;   Limits = (0.0 0.0 40.0 31.0)
;   Linetypes (RO) = #<VLA-OBJECT IAcadLineTypes 028e8634>
;   ModelSpace (RO) = #<VLA-OBJECT IAcadModelSpace3 028eb064>
;   Name = "C:\\Willey-Temp\\test\\12-2697-1731-5_003.dwg"
;   PaperSpace (RO) = #<VLA-OBJECT IAcadPaperSpace3 028ef864>
;   PlotConfigurations (RO) = #<VLA-OBJECT IAcadPlotConfigurations 028ef384>
;   Preferences (RO) = #<VLA-OBJECT IAcadDatabasePreferences 02905274>
;   RegisteredApplications (RO) = #<VLA-OBJECT IAcadRegisteredApplications 028ff9e4>
;   SummaryInfo (RO) = #<VLA-OBJECT IAcadSummaryInfo 029013f4>
;   TextStyles (RO) = #<VLA-OBJECT IAcadTextStyles 028f8234>
;   UserCoordinateSystems (RO) = #<VLA-OBJECT IAcadUCSs 028f8574>
;   Viewports (RO) = #<VLA-OBJECT IAcadViewports 028fc4d4>
;   Views (RO) = #<VLA-OBJECT IAcadViews 028df674>
; Methods supported:
;   CopyObjects (3)
;   DxfIn (2)
;   DxfOut (3)
;   HandleToObject (1)
;   ObjectIdToObject (1)
;   Open (2)
;   Save ()
;   SaveAs (2)
T

If you want to automate this, I think you need a more powerful language than Lisp or VBA, Lisp for sure.
Tim

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

Please think about donating if this post helped you.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Modify drawing without opening them?
« Reply #7 on: December 12, 2006, 04:08:19 PM »
Thanks for the clarification guys its been helpful.  Now I need to change direction.  maybe opening the drawing minimized?  preforming the operations then saving and closing?  I'll look into that.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Modify drawing without opening them?
« Reply #8 on: December 12, 2006, 04:15:12 PM »
Since you're only talking about 20+ drawings, script driven Vlisp or VBA should be fast enough to run while you make a cup of coffee.
..... and is a lot less complicated ..


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Modify drawing without opening them?
« Reply #9 on: December 12, 2006, 04:22:09 PM »
What they do now is run a bat routine that copies a file from the server renames it to acad.lsp.  In this file are the processes that they want to run so that everydrawing that is opened gets these instructions. after you have batch the drawings that you need batch you run another bat to restore the acad.lsp to its original state (a copy from the server) then all is back to normal.  It isn't a bad way of doing things unless you have work to do while you are batching.  If you forget to restore your config then every drawing you open gets batched and closed. PIA.

Just triing to come up with a smoother way to handle the process.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Guest

  • Guest
Re: Modify drawing without opening them?
« Reply #10 on: December 12, 2006, 04:24:21 PM »
Quote
I had thought about starting a vba app that would allows us to select the things that we want to do the select the directory of drawing to do it to.

Doable??
Certainly!

Here's a DVB from HumbugReality.com from a LONG time ago (with a few mods of my own).  You can tweak the code in the WorkOnDwg section to do whatever you want.  You select the starting directory, and the program will do whatever to the drawings in the selected directory as well as any sub-directories.

And as for batch plotting, here's a screen shot of what I wrote/use to batch plot DWGs in Land Desktop.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Modify drawing without opening them?
« Reply #11 on: December 12, 2006, 08:34:27 PM »
Are you familar with Publish ?

Publish Print drawing and EXECUTE LISP ADDED ON STARTUP SUITE !!
without opening AutoCAD.

1) create a simple lisp named test.lsp and enter this code
Code: [Select]
(command "_-Purge" "_A" "*" "_N" "_Qsave")
2) Add this test.lsp in your startup suite via "APPLOAD" command

3) Make a DWF with publish.

Done !

Otherwise,...you can use BatchLispProcessor

We use this technic to manage engineer seals.. ;-)
« Last Edit: December 12, 2006, 08:38:27 PM by Andrea »
Keep smile...

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Modify drawing without opening them?
« Reply #12 on: December 13, 2006, 06:13:21 AM »
Quote
And as for batch plotting, here's a screen shot of what I wrote/use to batch plot DWGs in Land Desktop.

The batch utility is nice I tried it this morning. as for the batch plotting utility, would you mind sharing so I don't have to start from scratch?  It looks quite promising.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Guest

  • Guest
Re: Modify drawing without opening them?
« Reply #13 on: December 13, 2006, 08:56:18 AM »
Well.... I dunno know...

OKAY. Sure. What the hell.  You've helped me out in the past (knowingly or unknowingly) so now it's my turn.

Here you go.  It uses named views to plot the layout tabs.  I'm not usually one for commenting code so I hope you've got your SHIFT + F2 fingers ready!  :)

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Modify drawing without opening them?
« Reply #14 on: December 13, 2006, 12:45:45 PM »
You've helped me out in the past (knowingly or unknowingly)

Unkowingly!  :-) 

[voices in my head]
WOW if he used something I said, he's in real trouble
[/end voices in my head]

Greatly appreciated.  I haven't looked at it yet (In the middle of some Clam Chowder).  I'm sure it will get me started.

Thanks again Matt
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Greg B

  • Seagull
  • Posts: 12417
  • Tell me a Joke!
Re: Modify drawing without opening them?
« Reply #15 on: December 13, 2006, 12:56:54 PM »
I haven't looked at it yet (In the middle of some Clam Chowder).

Trying to stay warm?

How do you get the Chowder stains out of your shirt?  Pants?  Socks?

Guest

  • Guest
Re: Modify drawing without opening them?
« Reply #16 on: December 13, 2006, 12:57:20 PM »
You're welcome.  Any questions, let me know.


Quote
I haven't looked at it yet (In the middle of some Clam Chowder).

It's not that Manhattan red $&*#, is it?

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Modify drawing without opening them?
« Reply #17 on: December 13, 2006, 01:04:36 PM »

Trying to stay warm?

No. I just like clam chowder?
 
Quote
How do you get the Chowder stains out of your shirt?  Pants?  Socks?

I usally use my tongue   :-D  (except when I get them in my under....forget it. that's a whole nother topic


Quote
It's not that Manhattan red $&*#, is it?
No it New England from a can  :roll:
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Guest

  • Guest
Re: Modify drawing without opening them?
« Reply #18 on: December 13, 2006, 01:05:31 PM »
Quote
No it New England from a can

Snow's??!?

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Modify drawing without opening them?
« Reply #19 on: December 13, 2006, 01:37:36 PM »
Quote
No it New England from a can

Snow's??!?

I live in Pennsylvania ????  But I suppose it does :lol:

Question.  I am in the middle of looking at this fantastic program you wrote.  If I were to make this program a batch processer  can I run a lisp from VBA on the selected drawings?  I have only gotten in to VBA enough to make my head hurt, but with this gem I think I need to investigate further.

Thanks
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Guest

  • Guest
Re: Modify drawing without opening them?
« Reply #20 on: December 13, 2006, 02:02:14 PM »
SendCommand should/might work, but if there's something that your LSP is doing that VBA can do, I would opt for the VBA way.