Author Topic: Come one come all - Bind my xrefs  (Read 9717 times)

0 Members and 1 Guest are viewing this topic.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Come one come all - Bind my xrefs
« on: January 09, 2008, 01:57:20 PM »
I need to bind 25000 xref'd drawings  :cry:  And before everyone starts screaming about why I dont want to do this, I already know.  Its out of my hands, and I was instructed I would do this, so get started  :pissed:

That being said, I am open to suggestions for how I should do this in the most productive way.  I am thinking a megga huge script file that calls either a LISP or VBA function to search the Block Table and bind my files.  Heres the kicker, I only want to bind 1 of 4 files that it finds.  There should only be 1 of the 4 versions, but I must check for all 4 and bind whatever I find.  ALL OTHER XREFS ARE TO BE MAINTAINED! (now everyone breathe a sigh of relief , I haven't completely lost my mind.  Also, sorry for shouting, just helping everyone know the world is still spinning in CAD land  :-D :lol:)

So anyone want to through together a quick version of how they would do it?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Come one come all - Bind my xrefs
« Reply #1 on: January 09, 2008, 01:59:31 PM »
use a MAP query
Be your Best


Michael Farrell
http://primeservicesglobal.com/

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Come one come all - Bind my xrefs
« Reply #2 on: January 09, 2008, 02:00:42 PM »
dont have Map, so I guess that wont work.  Great Idea though
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

T.Willey

  • Needs a day job
  • Posts: 5241
Re: Come one come all - Bind my xrefs
« Reply #3 on: January 09, 2008, 02:03:43 PM »
Since you are learning .Net, why not go that route.  I think the question about binding has been asked here, and Glenn helped said person.

If not, then I would use ObjectDBX with Lisp, but you can use VBA to do it also.  This way you won't have to open the drawings in the editor, and it will make it faster.  I would do it over night, and put in some code to write to a text file so you know if there were any problems.

Edit: Here is said .Net link.
Tim

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

Please think about donating if this post helped you.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Come one come all - Bind my xrefs
« Reply #4 on: January 09, 2008, 02:06:39 PM »
Thanks Tim.  I am learning .Net, and that's kinda what I'm leaning towards as well, but since I'm learning, I'm hoping to have someone throw me a bone.  If not, I will probably write it in VBA because my LISP skills are seriously lacking.  Way seriously lacking!
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

CAB

  • Global Moderator
  • Seagull
  • Posts: 10388
I've reached the age where the happy hour is a nap. (°Ώ°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: Come one come all - Bind my xrefs
« Reply #6 on: January 09, 2008, 02:17:43 PM »
Some of Tim's Routines:

http://www.theswamp.org/index.php?topic=12147.

http://www.theswamp.org/index.php?topic=11407.msg149665#msg149665
Thanks Alan.  I relearned somethings from those, but that isn't good news for CmdrDuh.  It looks like he will have to go  the .Net route, or a script file so that all the xref's get loaded into memory so they can be worked on.
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: Come one come all - Bind my xrefs
« Reply #7 on: January 09, 2008, 02:26:15 PM »

MP

  • Seagull
  • Posts: 17662
  • Have thousands of dwgs to process? Contact me.
Re: Come one come all - Bind my xrefs
« Reply #8 on: January 09, 2008, 02:53:07 PM »
Regardless how you do it David, VBA, DOT NET, LISP ... here's a couple things off the top of me noggin that I think you might be mindful to consider ...

  • The hosting requirements are going to balloon, and by magnitudes, so it would be advisable to assess how much headroom you have before you start (to determine if it's even feasible to proceed) and then monitor server free space as you process the files, elegantly terminating (and flagging where you left off) if there appears to be inadequate storage space rather than just crashing on a document save instruction.
  • It would be advisable to save each drawing to a new document, or backup all the originals first. You know you will have to have to restore an original at some point, the only question is when and how many. If you can't make a copy, say because of the storage requirements, log your activities to the degree that if you had to recreate any given drawing from a processed one you have adequate information to easily do so. See next item.
  • I would log the all activities (and errors, exceptions etc), either as dictionary entries in each drawing (i.e. date, time, xref block name, path, flags etc) or as one massive appended (simple csv) log that tracks everything including the successful / complete save of the document after all the binding activities.
  • Assume that a massive batch process in the order of 25000 drawings will most certainly crash at some point, possibly multiple times, so you will need to know where in the grand batch AutoCAD gave up the ghost in order to be able to easily and intelligently restart the batch. The underpinning to this would be the creation of a massive drawing list, rather than processing the drawings dynamically in a loop that's dynamically calling findfirst, findnext etc. See last sentence in preceding item.
  • If using the editor (as opposed to objectdbx, the latter which would be my preference) disable undo ability at the start of each new drawing to be processed. This will speed up operations as well as keep AutoCAD memory requirements more modest.

Good luck man.
Engineering Technologist • CAD Specialist • Programmer Analyst
Design • Drafting • Document Control • Automation.
cadanalyst@fastmail.com • https://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Come one come all - Bind my xrefs
« Reply #9 on: January 09, 2008, 02:58:35 PM »
I would very much like to use ObjectDBX, but I never have.  So any suggestions are welcome.  Since .Net seems to be the flavor of choice, could a MOD move this to the .net forum, and I will begin posting questions and code as I write it.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Come one come all - Bind my xrefs
« Reply #10 on: January 09, 2008, 02:59:56 PM »
Also, I forgot to mention that I dont have to have this done til July, so we have plenty of time to learn how to do this in .Net, and get a functional process defined
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

MP

  • Seagull
  • Posts: 17662
  • Have thousands of dwgs to process? Contact me.
Re: Come one come all - Bind my xrefs
« Reply #11 on: January 09, 2008, 03:00:54 PM »
... could a MOD move this to the .net forum ...

Done.
Engineering Technologist • CAD Specialist • Programmer Analyst
Design • Drafting • Document Control • Automation.
cadanalyst@fastmail.com • https://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

T.Willey

  • Needs a day job
  • Posts: 5241
Re: Come one come all - Bind my xrefs
« Reply #12 on: January 09, 2008, 03:04:03 PM »
Also, I forgot to mention that I dont have to have this done til July, so we have plenty of time to learn how to do this in .Net, and get a functional process defined
I'm willing to help where/when I can.  I think this could be a good learning for a .Net process.
Tim

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

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17662
  • Have thousands of dwgs to process? Contact me.
Re: Come one come all - Bind my xrefs
« Reply #13 on: January 09, 2008, 07:10:47 PM »
As far as any dot net coding goes I'm completely useless, however I will try to contribute by way of floating ideas and asking relevant questions.
Engineering Technologist • CAD Specialist • Programmer Analyst
Design • Drafting • Document Control • Automation.
cadanalyst@fastmail.com • https://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

MickD

  • Gator
  • Posts: 3420
  • (x-in)->[process]->(y-out)
Re: Come one come all - Bind my xrefs
« Reply #14 on: January 09, 2008, 07:21:15 PM »
The beauty of .net is it's like using arx in that you can open a db and molest it as much as you want without opening the drawing to the editor, similar as dbx only faster I'd imagine.
Opening the db/s is the easy bit, the xref part will be the kicker!
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

Lao Tzu: “To attain knowledge, add things
every day; to obtain wisdom, remove things every day.”