C# setting HPNAME not working
I'm trying to update a few system variable in C# based on what button a user selects.I'm having some issues with the HPNAME system variable.I set the variables like this:
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("HPNAME", HPNAME);Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("HPSCALE", HPSCALE);Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("HPANG", HPANG);
I'm trying to set HPNAME to GRASS, when I step through the code it is correctly trying to set HPNAME to GRASS however nothing happens and the system variable is never changed.When I manually change HPNAME to GRASS in the command line it works fine.
The other two system variables above are correctly changing values.
Are there any issues with changing HPNAME?I have tried hard coding GRASS as well to test but no success.
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("HPNAME", "GRASS");
Thanks, I tested your code and It appears to be working on my end. Using Civil 3D 2018. Stupid thing, needed to lock the document to be able to update some of the system variables.Everything is working now, thanks.
页:
[1]