Jump to content

Recommended Posts

Posted

I have 5 dwgs that need the same xrefs attached is there a script that could do this

Needs

A-FP01-296000100.dwg

A-FP01-basea-296000100.dwg

A-FP01-baseb-296000100.dwg

attached in model space

and

G-TBE-VR-.dwg

attached in paper space

 

I tried to write a script once and couldnt get past the open part im gonna start trying for this one but help would be great

Posted

i think this will do the xreffing but im stuck on the opening of dwgs

tilemode
1
-xr
a
A-FP01-296000100.dwg
0,0,0
1
1
0
-xr
a
A-FP01-basea-296000100.dwg
0,0,0
1
1
0
-xr
a
A-FP01-baseb-296000100.dwg
0,0,0
1
1
0
tilemode
0
-xr
a
G-TBE-VR-.dwg
0,0,0
1
1
0

Posted
I have 5 dwgs that need the same xrefs attached is there a script that could do this

Needs

A-FP01-296000100.dwg

A-FP01-basea-296000100.dwg

A-FP01-baseb-296000100.dwg

attached in model space

and

G-TBE-VR-.dwg

attached in paper space

 

I tried to write a script once and couldnt get past the open part im gonna start trying for this one but help would be great

 

download a copy of ScriptPro, it's an autodesk released product (no longer updated), but still on their website. it will allow you to select as many drawings as you like, select a .scr file and it will process everything for you. the other nice thing about .scr files is, you can just load some lsp code and it will process it just the same. once in a while, i still run scriptpro to batch several drawings.

 

save this as a .scr file and have scriptpro run it on the drawings you wish to edit:

(foreach x (list "A-FP01-296000100.dwg"
                "A-FP01-basea-296000100.dwg"
                "A-FP01-baseb-296000100.dwg"
                "G-TBE-VR-.dwg"
          ) ;_ list
 (cond
   ((wcmatch x "A-*") (setvar "tilemode" 1))
   ((wcmatch x "G-*") (setvar "tilemode" 0))
 ) ;_ cond
 (and (findfile x)
      (command "_.-xref" "_attach" x '(0 0 0) 1 1 0)
 ) ;_ and
) ;_ foreach
(command "_.qsave")

what about the layer? right now they will just placed on the current layer.

 

found it, here's the link: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=4091678&linkID=9240618

Posted

will do, thanks for the help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...