Calling Keyboard Shortcuts?

Calling Keyboard Shortcuts?

Anonymous
Not applicable
385 Views
5 Replies
Message 1 of 6

Calling Keyboard Shortcuts?

Anonymous
Not applicable
Is there anyway in visual basic to call keyboard shortcuts, for instance if i wanted to create a Copy Button, is there anyway to simply program the code to input "ctrl + c" to call the copy command within autocad? Thanks for any help in advance!
0 Likes
386 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
i don't have an answer to your question, however the clipboard object is accessible for example:

Dim objClip As New DataObject
Dim myText as String
objClip.SetText myText
objClip.PutInClipboard
0 Likes
Message 3 of 6

Anonymous
Not applicable
AutoHotkey is a useful program for easily mapping keys
0 Likes
Message 4 of 6

Anonymous
Not applicable
"ctrl+c" calls the copyclip command which create a temp drawing in your temp directory -
next time you call copyclip the last temp dwg gets deleted and a new one is created. If you
want to copy an entitiy within the drawing use the entity's copy method - if you need to copy
object to another drawing you could use the CopyObjects method.

wrote in message news:5867818@discussion.autodesk.com...
Is there anyway in visual basic to call keyboard shortcuts, for instance if i wanted to create a Copy Button, is there anyway to
simply program the code to input "ctrl + c" to call the copy command within autocad? Thanks for any help in advance!
0 Likes
Message 5 of 6

Anonymous
Not applicable
"Sendkeys" maybe?
0 Likes
Message 6 of 6

dgorsman
Consultant
Consultant
Keep in mind, not all users will have the same set-up - you cannot guarantee that cntrl-c will *always* invoke the same command.
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes