Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Windows Environment Variables in Macros

We came up with multiple sets of tool palettes, and set up macros on a ribbon panel to switch between those palette sets.  Those work fine as the macros point to a static path that all users will have on their PC.  I also would like to include a macro to point the path back to the default tool palettes, but it seems that the command does not recognize the Windows Environment variable and just creates a new tool palette folder in the Support directory.  Does BricsCAD support these variables in macros, or am i formatting it incorrectly?  Here are the examples.

This works perfectly to switch to the first set of tool palettes:


This doesn't seem to recognize the Windows Environment Variable:



  • You can use LISP to retrieve windows environment variables.
    [code]c^c^_toolpalettepath;(strcat (getenv "APPDATA") "\\Bricsys\\BricsCAD\\V16x64\\en_US\\Support\\ToolPalettes");[/code]

    In this case you are probably better to use ROAMABLEROOTPREFIX instead
    [code]c^c^_toolpalettepath;(strcat (getvar "ROAMABLEROOTPREFIX") "Support\\ToolPalettes");[/code]

    You could also wrap the whole thing in a setvar
    [code]c^c^(setvar "TOOLPALETTEPATH" (strcat (getvar "ROAMABLEROOTPREFIX") "Support\\ToolPalettes"));[/code]

    Jason Bourhill

This discussion has been closed.
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam