Can someone steer me towards the best way to populate SYSVARMON?

Can someone steer me towards the best way to populate SYSVARMON?

LDShaw
Collaborator Collaborator
1,417 Views
11 Replies
Message 1 of 12

Can someone steer me towards the best way to populate SYSVARMON?

LDShaw
Collaborator
Collaborator

Delima

 

IT requires me to keep the network deployment “Out of the box.” so I set all standards up through the Enterprise lisp file. Last line looks for an environment variable if it’s changed or not set it runs my company standards lisp. As we all know when you herd cats (AutoCAD users of varying skill and disciplines.) the best you can do is suggest if you are not going to micromanage their world.

 

My answer

I would like to use the sysvarmon tool to gently suggest things that can be changed to help them out. An examples would be

Colortheme 1

EDGEMODE 1

NAVVCUBEDISPLAY 0

I think if I can set these all up in sysvarmon and let the user decide which he's going to use I have half a chance to keep people happy.

 

My problem.

I can’t find any examples of people populating sysvarmon with a lisp routine. If I find an example I am gold without one there's not much chance for me.

0 Likes
Accepted solutions (2)
1,418 Views
11 Replies
Replies (11)
Message 2 of 12

Ranjit_Singh
Advisor
Advisor

Sysvarmon is stored in registry. See here on how to access its contents. However, you will have to apply the settings while AutoCAD isn't running or, temporarily switch profiles. I am not sure if the second approach will work but give it a try. On my system, no matter what changes I do they are not reflected until I restart the application. I would add lisp code to acad.lsp file. That way when AutoCAD starts all the necessary settings will be applied.

You can find tons of help in these forums on how to access and read/write registry. See AutoCAD help here. See one example I did here.

0 Likes
Message 3 of 12

LDShaw
Collaborator
Collaborator

One step forward 10 steps back.

Taking your advice I looked at the thread SYSVARMON and LSP  and the others you suggested again.
I still dumbed it down and I still can't seem to get it.

Even when I just add a simple write.

(vl-registry-write "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\R22.0\\ACAD-1001:409\\Profiles\\test sysvar\\SysvarMonitor" "AFLAGS" "16")

and see it in the registry

 

Capture.PNG

I still can't see it in sysvarmon. Nor does it stick in the profile. As soon as I start acad with the profile it gets removed from the registry. I've tried many ways of doing it including adding another profile. (Registry entry sticks.) exiting out of autocad using the /u switch. (Desperate to get something to work.) When I get into autocad the AFLAGS var disappears.

In all my attempts I have never gotten aflags to survive the registry much less see it when I do a sysvarmon.

As a side note if I create another profile using the profile "test sysvar" it will stick with the new profile until I go out of autocad and back into it using the new profile then it's gone.

0 Likes
Message 4 of 12

Ranjit_Singh
Advisor
Advisor

As I stated earlier in Post 2 .... However, you will have to apply the settings while AutoCAD isn't running  ...... Did you try to add to the registry while AutoCAD isn't launched yet? Do whatever you need to do to the registry first and then launch AutoCAD. See screencast. You may have to resort to windows shell to make changes to the registry and not use autoCAD evaluator. In SysvarMon case, when you make changes to registry while AutoCAD is running it does not register the change. I am pretty sure though, that if you use acad.lsp to write to registry it should work. I will give it a try sometime this weekend.

0 Likes
Message 5 of 12

john.uhden
Mentor
Mentor

As I am still running nothing newer than 2002, I am not familiar with sysvarmon.  But it looks to me like they can all be set via setvar.  What's wrong with that?

John F. Uhden

0 Likes
Message 6 of 12

cadffm
Consultant
Consultant

@john.uhden - It is to monitor system variables, not to set.

Autodesk has been providing online help for years, So you can easily see the helpers of different product and versions.
F1 - SYSVARMONITOR and Dialog, to control with SYSMON / Youtube or This

 

 

@Ranjit_Singh

 I had written in the other thread that it goes over a profile change, which was unfortunately wrong. Smiley Sad

Acad.lsp is much too late (will be after all cuix files, and these are already determined by the profile)

 

 

 

Sebastian

0 Likes
Message 7 of 12

LDShaw
Collaborator
Collaborator

I saw where you said you had to use a profile other than the current one.
My error was setting the table while in autocad. That changed things. As soon as I changed the registry with regedit WITHOUT acad open it worked .

If you want to play here's one you'll like.

 

Make the change the registry like you did on the  current profile.

Check entry via sysvarmon like you did. Looks good.

Open up the registry to a different profile (Or not. This just lets you see it happen.) change your current profile to the one you're looking at.
The NEW profile sysvarmon table reverts to the previous profile. It even changes the registry entry in the current profile so next time it's set wrong.

Not sure it won't do this even if you just change sysvarmon and then change profile.

HA!!
I just tried this in autocad.

Add something to sysvarmon to the current profile change your profile and you will see your new sysvarmon has it added. I think we just found a feature (bug). That is if I am using it at all correctly.

0 Likes
Message 8 of 12

LDShaw
Collaborator
Collaborator
Accepted solution

Thought I would add an example.
This shows an edit to sysvarmon that propagates to the next profile.

 

0 Likes
Message 9 of 12

Ranjit_Singh
Advisor
Advisor
Accepted solution

As I mentioned earlier do not have acad open while making changes. Make changes to whatever profile(s) you need (while acad is closed) and then you are done. Note that when AutoCAD starts, whatever profile you have active at that instance will dictate what sysvarmon settings will continue throughout that AutoCAD session. Even if you switch profiles it will maintain the sysvarmon settings (ignoring what you did in the registry to this other profile).

The basic idea of sysvarmon is for the user to monitor when certain variables change (this is not profile specific). You will never be able to have a different set of variables that you can monitor for different profiles, during a same session. Why would someone want to do that? All profiles reside in the same Acad application. I understand that one may want different variable settings for different profiles but then as @john.uhden mentioned earlier, you need to use LISP for that. Maybe through reactors. But even after doing so you will not be able to have a different set of monitoring variable for different profiles during the same Aacad session. I believe, that is just not the idea of sysvarmon.

0 Likes
Message 10 of 12

LDShaw
Collaborator
Collaborator

Sorry I got caught up in the problem and forgot what the real question was. Yes, I agree, what I was thinking about doing won't work as nice (If at all.) as I wanted. I should have said that earlier. That last little bit I posted was not needed and just confused the issue. A an FYI sysvarmon works differently in 2018 than it did in 2017.

I will reluctantly accept you're answer of You will never be able to have a different set of variables that you can monitor for different profiles. as valid.

0 Likes
Message 11 of 12

Ranjit_Singh
Advisor
Advisor

@LDShaw wrote:

Thought I would add an example.
This shows an edit to sysvarmon that propagates to the next profile.

 


Post 1 was talking about deployment, which is done remotely on multiple machines (mostly when users are not even present). That was the driving idea behind all my above responses.
How do you do that if you use the GUI? If you are talking about deployment then you need to edit the registry through windows shell (Before launching AutoCAD. IT can help you with this). Now you have given the users an initial setup. From there on they can take over and edit as they need.

 

0 Likes
Message 12 of 12

Ranjit_Singh
Advisor
Advisor

@LDShaw wrote:

...............
I will reluctantly accept you're answer of You will never be able to have a different set of variables that you can monitor for different profiles. as valid.


I hope I have not confused you. My statement still is true. You will never be able to have a different set of variables that you can monitor for different profiles. In the example screencast you posted above, you are not monitoring two different set of variables for two different profiles. You have just one set of variables. When you change the settings through GUI, Acad now starts monitoring this new set of variables (that are applicable to every single profile in your profiles list). Even if you switch profiles now this new set will be monitored. Unless you manually change it through the GUI. But now again this newer set of variables is being monitored for every single profile. You do not have two different sets for two different profiles at any given time. Hope it makes sense.

0 Likes