Author Topic: Make the impossible possible  (Read 2102 times)

0 Members and 1 Guest are viewing this topic.

phatepwns

  • Guest
Make the impossible possible
« on: July 21, 2014, 08:05:25 AM »
Hi all,

I am looking at a task for which I can't see a solution. Perhaps i'm not looking outside of the box.

We have a model and end sheets setup. Base model > multiple end sheets that reference the base model.

Within the base model I xref (attach) the arch background, grids etc.

Within the sheet file, on the title block I want to have a field / diesel expression that looks specifically at the arch xref, and displays two custom "drawing properties" the purpose is to show the original file reference and original file revision.

Thus, one update of the base xref will update hundreds of sheets with this info.

Is that clear as mud?!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Make the impossible possible
« Reply #1 on: July 21, 2014, 09:04:14 AM »
Welcome to the Swamp.

Let's see if I got this. You want a Magic Button that you don't need to press, just think about pressing & all is made well.  :)

Just kidding. Still goofy from all the sinus meds I'm taking this morning.

Seems like a Field could handle that. There are a few Field experts here that could tell you but I am not one of them so be patient.
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.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Make the impossible possible
« Reply #2 on: July 21, 2014, 09:14:41 AM »
It will work ONLY if omeone updates those drawing custom properties.....so even with a field it will only be semi-automatic.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Make the impossible possible
« Reply #3 on: July 21, 2014, 09:27:26 AM »
When you load a DWG will all fields be updated?
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.

LE3

  • Guest
Re: Make the impossible possible
« Reply #4 on: July 21, 2014, 10:01:36 AM »
have been a while since I stop doing CD's production work... but when I used the SSM, I had my title-block and fields separate, then inserted those two into my sheets, then inside acad.mnl, used this lsp routine to update each time the sheet/drawing it is opened, see here - if helps:

http://www.theswamp.org/index.php?topic=9441.msg172145#msg172145

have fun, and welcome to the swamp...

phatepwns

  • Guest
Re: Make the impossible possible
« Reply #5 on: July 21, 2014, 11:49:26 AM »
Thanks gents for the replies.

A magic button would be good!

In essence the golden question for me is, can you read external DWG information from a parent DWG. or are field codes only local to the DWG you are within?

Fields update automatically when you save / regen / plot etc depending on your settings. The act of updated the custom drawing property wouldn't be a problem, I am just seeing what the best way of achieving this is. Attached is a box present on hundreds of drawings, I want to try and have some sort of Jedi trick to update this on mass.

I am now thinking that a Data linked excel sheet could work too, update the "master" excel file and this will update on the title block! I like doing things on batch or on mass. Like a production line of CAD!

NOT SURE

  • Guest
Re: Make the impossible possible
« Reply #6 on: July 21, 2014, 02:02:23 PM »
How about a simple txt file with the information stored in it. Then a small bit of lisp in the acaddoc.lsp to update the drawings when opened.

Or, you could use a batch processor and some lisp. That'd be the way I'd do it.

Code: [Select]
(DEFUN C:batch_anything ()

;;;;;;;;;;;;;;;;;;;;;;;;;Select directory to be processed

(setq dfil (getfiled "Select A File In The Directory You Want To Batch Process" "p:/" "dwg" 0))
(setq wutdir (vl-filename-directory dfil))
(setq wutfiles (vl-directory-files wutdir "*.dwg"))

(setq scrfile (open "c:\\scrfile.scr" "w"))
(close scrfile)
(setq scrfile (open "c:\\scrfile.scr" "a"))

(foreach n wutfiles
(setq n2 (strcat "\""wutdir "\\" n "\""))
(setq n2 (vl-string-translate "\\" "\\" n2))
(setq scrline (strcat "open" " " n2 " " "(load\"batch_core\")" " " "batch_insert" " " "qsave" " " "close"));;;;;;;COMMANDS FOR BATCH GO HERE
(write-line scrline scrfile)
(princ)
)

(close scrfile)
(command "script" "c:\\scrfile")

(princ "\n***Batch complete.***")
(princ)


);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DEFUN

This works from an open AutoCad session.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Make the impossible possible
« Reply #7 on: July 21, 2014, 02:07:01 PM »
en masse


just so you know

Be your Best


Michael Farrell
http://primeservicesglobal.com/

NOT SURE

  • Guest
Re: Make the impossible possible
« Reply #8 on: July 21, 2014, 09:24:49 PM »
roit! Got it.