Message 1 of 14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I write a example vba macro like this:
Public Sub main()
MsgBox "hi"
End Sub
I stored it at :
F:/gr/masoud.dvb
I write a lsp file like this masoud.lsp:
(defun s::startup()
(command "-vbaload" "F:/gr/masoud.dvb")
(setvar "cmdecho" 0)
(defun c:MAINGR()
(command "vbarun" "masoud.main")
)
I load this macro at autocad:
1. run CUI command
2. LISP Files
3. load masoud.lsp
but when I run this command:
MAINGR
it says:
Unknown command MAINGR
moderator: added code to code windows
Solved! Go to Solution.