pwned555 Posted May 28, 2018 Share Posted May 28, 2018 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, Quote Link to comment Share on other sites More sharing options...
Hippe013 Posted May 30, 2018 Share Posted May 30, 2018 I tested your code and It appears to be working on my end. Using Civil 3D 2018. Quote Link to comment Share on other sites More sharing options...
pwned555 Posted August 2, 2018 Author Share Posted August 2, 2018 Stupid thing, needed to lock the document to be able to update some of the system variables. Everything is working now, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.