Jump to content

C# setting HPNAME not working


pwned555

Recommended Posts

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,

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...