Macro Not Found Environment Variable -VBARUN

Macro Not Found Environment Variable -VBARUN

Anonymous
Not applicable
1,936 Views
3 Replies
Message 1 of 4

Macro Not Found Environment Variable -VBARUN

Anonymous
Not applicable
Hi All, I am trying to perform a -vbarun on an environment variable path for a macro I created however im getting an error message 'Marco Not Found'. Below is the path i am putting into the command line, including quotations to allow for spaces in path code: “Environ("APPDATA") & "\DD\AC\2017\getAttr.dvb!mdlGeneral.setupPaths”” The Environment Variable "APPDATA" = C:\Users\username\AppData When I enter the path location in not using the environ variable the macro is found and works fine. C:\Users\username\AppData\DD\AC\2017\getAttr.dvb!mdlGeneral.setupPaths can an environment variable path be used in -vbarun operation? any help would be greatley appreciated thanks, Josh
0 Likes
1,937 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor

Environment variables need to be enclosed in per/cent signs.

Environ("%AppData%")

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 4

Anonymous
Not applicable
Hi Ed, thanks for your help, but unfortunatley that was not successful. can environment variables be used through the autocad command line? thanks Josh
0 Likes
Message 4 of 4

Ed__Jobe
Mentor
Mentor

I made a mistake with the last post. I misread what you are trying to do. The Environ function doesn't use %, just the variable name in quotes. But it can only evaluate in the vba context, not at the command line. The command line can evaluate lisp though. Try this:

 

-vbarun (strcat (getenv "appdata") "\\DD\\AC\\2017\\getAttr.dvb!mdlGeneral.setupPaths”)

 

I haven't tested the syntax, but you should get the idea.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature