cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Anyway to copy path to clipboard as text, not as element?

SOLVED
Highlighted
Newbie

Anyway to copy path to clipboard as text, not as element?

I'm trying to get a macro in Arbortext Isodraw that copies the path and filename of the active document to clipboard.

I've tried combinations of copy and path and StripExt but it usually ends up in copying the text as an element, instead of to the clipboard.

I might try to do a text log that outputs the active doc path and filename, but it would be nice if there was an easier way!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Anyway to copy path to clipboard as text, not as element?

I'll refer to this as a hack.

Macro Clipboard

    Launch "C:\WINDOWS\system32\cmd.exe" "/c Start /Min echo " + StripExt(ActiveDoc.Path) + "^|clip"

End Macro

View solution in original post

6 REPLIES 6
Highlighted

Re: Anyway to copy path to clipboard as text, not as element?

I'll refer to this as a hack.

Macro Clipboard

    Launch "C:\WINDOWS\system32\cmd.exe" "/c Start /Min echo " + StripExt(ActiveDoc.Path) + "^|clip"

End Macro

View solution in original post

Highlighted

Re: Anyway to copy path to clipboard as text, not as element?

It works!

I tried it at first, and it didn't work. But I realized there is a problem when the Folder Path has spaces in it.

Currently looking up how to deal with that!

Edit:

It simply just works. Thanks!

Highlighted

Re: Anyway to copy path to clipboard as text, not as element?

Glad it worked!

Highlighted

Re: Anyway to copy path to clipboard as text, not as element?

Hey Trevor, do you know anything about the terminate command?

It's not absolutely necessary but it would be nice to terminate the cmd window that was just created.

I know we have to specify the process ID, but how would you do this consistently each time you use it?

Highlighted

Re: Anyway to copy path to clipboard as text, not as element?

Ooff hand try changing /c to /k. It's actually part of the Windows cmd command versus IsoDraw.

Highlighted

Re: Anyway to copy path to clipboard as text, not as element?

Okay, this is the fix that works.

macro GetFilePath

        Launch "C:\WINDOWS\system32\cmd.exe" "/c Start cmd /c echo " + ActiveDoc.path + "^|clip"

End Macro

Thanks again! It looks like /c was right but I modified it to pass to cmd and now everything closes when it's done!

Announcements