What is the system variable for displaying scroll bar in drawing?

What is the system variable for displaying scroll bar in drawing?

Anonymous
Not applicable
826 Views
6 Replies
Message 1 of 7

What is the system variable for displaying scroll bar in drawing?

Anonymous
Not applicable
0 Likes
827 Views
6 Replies
Replies (6)
Message 2 of 7

dbroad
Mentor
Mentor

Not everything is controlled by system variables.

 

For this aspect, you need to access the display preferences.  Look at the ActiveX  Object Model (ActiveX) http://help.autodesk.com/cloudhelp/2016/ENU/AutoCAD-ActiveX/files/GUID-A809CD71-4655-44E2-B674-1FE20...

 

There are helper functions to work with the activex object properties and methods.  These will gain control over many parts of AutoCAD

 

For example:

 

(setq displaypref
		   (vla-get-display
		     (vla-get-preferences
		       (vlax-get-acad-object))))

(vla-get-displayscrollbars displaypref)

(vla-put-displayscrollbars displaypref :vlax-true)

;Alternatively you can use :vlax-false to turn them off.
Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 7

Anonymous
Not applicable

I've found the solution with your help 🙂

 

AcadPreferences Preferences = (AcadPreferences)Autodesk.AutoCAD.ApplicationServices.Application.Preferences;

Preferences.Display.DisplayScrollBars = false;

 

Do you know why I'm getting an error when I want to set Taskbar = 0;

 

Autodesk.AutoCAD.ApplicationServices.Core.Application.SetSystemVariable("TASKBAR", 0);

"An exception of type 'Autodesk.AutoCAD.Runtime.Exception' occurred in accoremgd.dll but was not handled in user code"

0 Likes
Message 4 of 7

dbroad
Mentor
Mentor

Please note: This is a visual lisp newsgroup.  When you ask a question without specifying the customization language, you will get Visual Lisp as a response.  There is a VBA newsgroup that you can post VBA questions on.  I do not have the visual basic plug-in for AutoCAD at my current location so cannot answer your question.  If it remains unanswered tonight, I will let you know.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 5 of 7

dbroad
Mentor
Mentor

This code works. Your code snippet looked a bit weird unless I am mistaken about it being VBA. If you need .NET code, visit the .NET newsgroup.  Hope this helps.

Option Explicit
Sub nobars()
Dim dpref As AcadPreferencesDisplay
Set dpref = Application.Preferences.Display
dpref.DisplayScrollBars = False
End Sub

Sub bars()
Dim dpref As AcadPreferencesDisplay
Set dpref = Application.Preferences.Display
dpref.DisplayScrollBars = True
End Sub

  

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 6 of 7

Anonymous
Not applicable

@dbroad

 

Thank you very much for help. I've made a mistake and choose wrong category 🙂

 

In case of TASKBAR - this is not system variable, just want to write if something will search for it.

 

Smiley Happy

0 Likes
Message 7 of 7

dbroad
Mentor
Mentor

OK, glad to help.

 

Taskbar is not a system variable.  It is a command.  It should not have any relevance however in Window 8 or higher and should not have any relevance in the CORE console because that is a background process that would not have a taskbar presence anyway.  The core console if a non-interactive environment for creating/editing drawings.

Architect, Registered NC, VA, SC, & GA.
0 Likes