Help on creating a shortcut in AutocAD using MACRO VBA

Help on creating a shortcut in AutocAD using MACRO VBA

Anonymous
Not applicable
957 Views
3 Replies
Message 1 of 4

Help on creating a shortcut in AutocAD using MACRO VBA

Anonymous
Not applicable

I want to insert notes in my drawings ,using one simple click , by creating a customize tool bar button. How can I do it by writing a macro in VB. Please help me with the macro. I am attaching a snapshot for already done. In the snapshot red highlighted is the shortcut. When I click on it I get a note inserted in drawing. How can I do it for other notes?

0 Likes
958 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Your toolbar can use lisp vba or just plain Autocad commands you dont need any special vba coding.

 

^c^c^pinsert notes3 pause 1 0

 

^c^c^p(command "-insert" "notes3 (getpoint) 1 0)

 

vba........

 

[code]

; handles block names with spaces in directory structure and name

(defun openblk (blkname / adocs)
(setq acDocs (vla-get-documents (vlax-get-acad-object)))
(vla-open acDocs blkname)
(vla-activate (vla-item acdocs 1))
)

[/code]

 

[code]

**PIPES
[PIPES]
[xxxSLD(SD201,SUBSOIL)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG201")

[\code]

 

0 Likes
Message 3 of 4

Anonymous
Not applicable
Sorry I did not understand what you are trying to say.
0 Likes
Message 4 of 4

Anonymous
Not applicable
Can you please give me step by step process
0 Likes