custom menu command: how to write a file's path to switch an xref?

custom menu command: how to write a file's path to switch an xref?

boicottms
Enthusiast Enthusiast
934 Views
6 Replies
Message 1 of 7

custom menu command: how to write a file's path to switch an xref?

boicottms
Enthusiast
Enthusiast

Hi,

I wuant to do some menu commands to quickly switch the referenced file (I have a plan under a section and I want to change floors). Copying the commands from the F2 window (and the relative path from the xref window) they should be

^C^C-xref;p;plan;.\MRNC-AE-P00_groundFloor.dwg
^C^C-xref;p;plan;.\MRNC-AE-P01_firstFloor.dwg

…and so on.

But the path is not recognized: it stops at the dot and waits for the rest of the path.

I tested also enclosing the path in 'quotes (single and double), and also tryied to escape special characters, but the command doesn't recognize it as a path.

It wors as expected on the command line.

What's the correct syntax?

Thank you

Thank you

0 Likes
935 Views
6 Replies
Replies (6)
Message 2 of 7

ВeekeeCZ
Consultant
Consultant

Try / instead of \

Also if you have path with spaces, you would need to wrap it into ""

0 Likes
Message 3 of 7

boicottms
Enthusiast
Enthusiast

Hi, can you specify?

I tested

^C^C-xref;p;plan;".\MRNC-AE-P01_firstFloor.dwg";
^C^C-xref;p;plan;"\.\\MRNC-AE-P01_firstFloor.dwg";
^C^C-xref;p;plan;"/.\MRNC-AE-P01_firstFloor.dwg";
^C^C-xref;p;plan;"\.\\MRNC-AE-P01_firstFloor.dwg";
^C^C-xref;p;plan;"\.\/MRNC-AE-P01_firstFloor.dwg";

trying to use backslash to escape the special characters without success.

Thank you

0 Likes
Message 4 of 7

ronjonp
Advisor
Advisor

Maybe try: (findfile ".\MRNC-AE-P00_groundFloor.dwg")

0 Likes
Message 5 of 7

Anonymous
Not applicable

I dont use xrefs much but a manual check of steps.

 

: -XREF
External References [? to list external references/Attach/Overlay/Bind/Detach/Path/Reload/Unload] <Attach>:p
Externally referenced drawing(s) to edit path <*>

 

Plan ?? screws up 

0 Likes
Message 6 of 7

ВeekeeCZ
Consultant
Consultant

If the MRNC-AE-P00_groundFloor.dwg is stored one level above, then...

 

^C^C-xref;p;plan;../MRNC-AE-P00_groundFloor.dwg

 

Or possibly if there is a space in 

 

^C^C-xref;p;plan;"../MRNC-AE-P00_groundFloor 1.dwg"

MRNC-AE-P00_groundFloor.dwg

0 Likes
Message 7 of 7

boicottms
Enthusiast
Enthusiast

"Plan" is the xref name the command is asking for

0 Likes