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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

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

ttea
1-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
thendricks
3-Visitor
(To:ttea)

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
thendricks
3-Visitor
(To:ttea)

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

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!

thendricks
3-Visitor
(To:ttea)

Glad it worked!

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?

thendricks
3-Visitor
(To:ttea)

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

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!

Top Tags