Jump to content
bababarghi

System variable for "Access Online Content"

Recommended Posts

bababarghi

Hopefully I have created the thread in the right place.:unsure:

 

I was wondering if there is any system/environment variable to disable accessing online content? (I need to disable this feature via my lisp code)

 

2i92w43.jpg

Share this post


Link to post
Share on other sites
bababarghi

Found the answer here.

 

WBHELPONLINE is the undocumented variable name.

 

However that is a Read Only variable.:(

Edited by bababarghi

Share this post


Link to post
Share on other sites
RobDraw

Then it doesn't really answer your question.

 

Does that mean there isn't a variable to control it?

 

Why LISP?

 

Isn't that setting stored in your profile so that once you change it the setting sticks?

Share this post


Link to post
Share on other sites
bababarghi

You are right. Not really addressed my issue.

 

So far, that's the only clue I found in regard to online access permissions.

 

LSP deployment is preferred because I need to push lots of settings to new CAD machines in our office e.g support paths, template paths, printer configs, etc. Disabling online access is also one the items which needs to be applied on new machines.

 

I have a feeling that, at the end of the day, I need to pursuit Registry editing solutions (which is not preferred at all)

Share this post


Link to post
Share on other sites
ReMark

Are you referring to the InfoCenter also called the CommCenter?

Share this post


Link to post
Share on other sites
bababarghi

The intent is to be able to bring up 'offline' help window by pressing F1 key.

Share this post


Link to post
Share on other sites
ReMark

Ahhhh, I see. Now we are getting to the crux of the matter. Clarity provides direction.

Share this post


Link to post
Share on other sites
RobDraw

Granted I don't get much involved with the network stuff and this may be "old school" but don't you have a default profile that can be loaded at any time for setting/resetting paths, variables, etc.?

Edited by RobDraw

Share this post


Link to post
Share on other sites
BlackBox

However that is a Read Only variable.:(

 

Is it now... Give this a try:

 

(vl-load-com)

(defun c:OnlineContentOff ()
 (vl-registry-write
   (strcat
     "HKEY_CURRENT_USER\\"
     (if vlax-user-product-key						; If 2013
(vlax-user-product-key)						; Use 2013 function
(vlax-product-key)						; Use legacy function
     )
     "\\Profiles\\"
     (getvar 'cprofile)
     "\\Variables\\"
   )
   "WBHELPONLINE"
   0
 )
 (alert
   (strcat
     "Online content has been disabled.\n\n"
     "Please restart your session for these changes to take effect. "
   )
 )
 (princ)
)

Share this post


Link to post
Share on other sites
BlackBox
Are you referring to the InfoCenter also called the CommCenter?

 

... And since it is loosely related to this thread:

 

(vl-load-com)

(defun c:InfoCenterOff ()
 (vl-registry-write
   (strcat
     "HKEY_CURRENT_USER\\"
     (if vlax-user-product-key						; If 2013
(vlax-user-product-key)						; Use 2013 function
(vlax-product-key)						; Use legacy function
     )
     "\\InfoCenter"
   )
   "InfoCenterOn"
   0
 )
 (alert
   (strcat
     "InfoCenter has been disabled.\n\n"
     "Please restart your session for these changes to take effect. "
   )
 )
 (princ)
)

Share this post


Link to post
Share on other sites
bababarghi

Works perfectly fine except the the RED coloured bit highlighted at following code. The value should be string :)

 

Is it now... Give this a try:

 

(vl-load-com)

(defun c:OnlineContentOff ()
 (vl-registry-write
   (strcat
     "HKEY_CURRENT_USER\\"
     (if vlax-user-product-key						; If 2013
(vlax-user-product-key)						; Use 2013 function
(vlax-product-key)						; Use legacy function
     )
     "\\Profiles\\"
     (getvar 'cprofile)
     "\\Variables\\"
   )
   "WBHELPONLINE"
   [color="red"][b]"[/b][/color]0[color="red"][b]"[/b][/color]                  ; [color="red"]<------This line needed a couple of (")[/color]
 )
 (alert
   (strcat
     "Online content has been disabled.\n\n"
     "Please restart your session for these changes to take effect. "
   )
 )
 (princ)
)

Share this post


Link to post
Share on other sites
BlackBox

Strange - in 2014 it appeared to be int(-eger) from RegEdit view. Especially so, given that InfoCenterOff requires same.

 

Guess that's what I get for writing code in the post editor and not testing. LoL

 

In any event, I'm glad you got it sorted, and thank you for the clarification. :beer:

 

Cheers

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