Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How do I copy a string from my variable to the clipboard for paste?
Solved! Go to Solution.
How do I copy a string from my variable to the clipboard for paste?
Solved! Go to Solution.
at AutoCAD command line:
command: (setq a "test string")
command: !a
command: "test string"
select & highlight the above and do Ctrl+C
Command: (startapp"notepad")
then in Notepad do Ctrl+V
Assuming YourVariableName is the variable that contains the string in question, a little Searching reveals several places with this who-would-have-guessed kind of structure:
(vlax-invoke
(vlax-get
(vlax-get (setq htmlfile (vlax-create-object "htmlfile")) 'ParentWindow)
'ClipBoardData
)
'SetData
"Text"
YourVariableName
)
That will put it in the clipboard directly from the variable contents, without your needing to pull it from the variable and Ctrl+C copy it.