Jump to content

attach xref script


Recommended Posts

Hello all,

i`ve made a script that makes a layer "XREF" and make it current. And set the layout to modelspace. Aftert that i want to attach a XREF. This xref drawingfile is in a subfolder of the main drawing. Because the file name of the xref is always different so i used a * (asterik) as filename. So this is not working. There is always just one Xref file in the subfolder.

 

See script:


-LAYER

MAKE

XREF

 

LAYOUT

SET

MODEL

-XREF

ATTACH

.\XREF\*.DWG

0,0,0

1

1

0

 

Is there a way to get this working, script or lisp? Problem is the * as filename.

 

 

Thanks,

PmxCAD

Link to comment
Share on other sites

Not sure about the whole script but perhaps instead of just a * you can try at least a partial name that hopefully is common.

Link to comment
Share on other sites

if you use lisp you can use the findfile function to look in the current dwg directory and load any other dwg's there. A script will need an actual name. Another way is you can do lisp in a script so if you know name you can type it and then use (command "Attach" filename)

Link to comment
Share on other sites

Alternatively, and if you don't mind paying $10, Consider this application. It will process your XREFs without opening any drawings.

Link to comment
Share on other sites

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...