Jump to content
pwned555

C# setting HPNAME not working

Recommended Posts

pwned555

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,

Share this post


Link to post
Share on other sites
Hippe013

I tested your code and It appears to be working on my end. Using Civil 3D 2018.

Share this post


Link to post
Share on other sites
pwned555

Stupid thing, needed to lock the document to be able to update some of the system variables. Everything is working now, thanks.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...