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

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!

ACCEPTED SOLUTION

Accepted Solutions
thendricks
12-Amethyst
(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
12-Amethyst
(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

ttea
7-Bedrock
(To:thendricks)

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
12-Amethyst
(To:ttea)

Glad it worked!

ttea
7-Bedrock
(To:thendricks)

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
12-Amethyst
(To:ttea)

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

ttea
7-Bedrock
(To:thendricks)

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

Top Tags