Sending arguments to macro from AutoLISP

Sending arguments to macro from AutoLISP

Anonymous
Not applicable
205 Views
2 Replies
Message 1 of 3

Sending arguments to macro from AutoLISP

Anonymous
Not applicable
I saw a description of how you can send arguments to a vba macro from
AutoLISP, not directly, but a workaround, sort of. Now I can't find it
again. Anyone got an example of how to use

(command "_vbarun" "macro" "arg1" "arg2")

and what the VBA code is needed?

Thanks,
Monte
0 Likes
206 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Youre probably referring to the thread titled:

Options when calling a function from a button within acad?

Monte wrote in message
news:3ad76efb.10310716@discussion.autodesk.com...
> I saw a description of how you can send arguments to a vba macro from
> AutoLISP, not directly, but a workaround, sort of. Now I can't find it
> again. Anyone got an example of how to use
>
> (command "_vbarun" "macro" "arg1" "arg2")
>
> and what the VBA code is needed?
>
> Thanks,
> Monte
0 Likes
Message 3 of 3

Anonymous
Not applicable
Try to use the GetString function.:

Sub RenameBlocks()
' This routine converts blocknames to be preceeded with the filename.
On Local Error Resume Next
Dim BlockDef As AcadBlock

FromTxt$ = ThisDrawing.Utility.GetString(False, "Find what ")
If FromTxt$ = "" Then
ThisDrawing.Utility.Prompt "Cancelled"
Exit Sub
End If
ToTxt$ = ThisDrawing.Utility.GetString(False, "Replace with ")
.....
.....

Kind regards

Michael Christoffersen
3DI

"Monte" wrote in message
news:3ad76efb.10310716@discussion.autodesk.com...
> I saw a description of how you can send arguments to a vba macro from
> AutoLISP, not directly, but a workaround, sort of. Now I can't find it
> again. Anyone got an example of how to use
>
> (command "_vbarun" "macro" "arg1" "arg2")
>
> and what the VBA code is needed?
>
> Thanks,
> Monte
0 Likes