TheSwamp
Code Red => VB(A) => Topic started by: FengK on September 27, 2008, 05:28:56 PM
-
Hello,
I remember Matt W posted a vba program a while ago for setting user's favorite osmode. Could not find it anywhere. I probably didn't use the right keyword to search. Anyone knows?
Thanks.
-
Might it have been this topic: http://www.theswamp.org/index.php?topic=503.0 (http://www.theswamp.org/index.php?topic=503.0)
-
I have a startup macro that looks at login name and sets based on that. I can post tomorrow from work
-
Might it have been this topic: http://www.theswamp.org/index.php?topic=503.0 (http://www.theswamp.org/index.php?topic=503.0)
Thanks Michael. It was written by Matt W and was in VBA. I downloaded it and used it, but have lost the file. Matt must know what I'm talking about, if he sees this thread.
-
I have a startup macro that looks at login name and sets based on that. I can post tomorrow from work
Thanks!
-
Hello,
I remember Matt W posted a vba program a while ago for setting user's favorite osmode. Could not find it anywhere. I probably didn't use the right keyword to search. Anyone knows?
Thanks.
This?
-
or this?
Public Sub AcadStartup()
Dim Preferences As AcadPreferences, intOsmode As Integer
Set Preferences = ThisDrawing.Application.Preferences
Dim strUser As String
strUser = UCase(Environ("USERNAME"))
Select Case strUser
Case "UA02038"
intOsmode = 71
ThisDrawing.SetVariable "ORTHOMODE", 1
Case "UA00648"
intOsmode = 167
ThisDrawing.SetVariable "ORTHOMODE", 1
Case "UA03347"
intOsmode = 19
Case Else
intOsmode = 7
End Select
If intOsmode = 0 Then
ThisDrawing.SetVariable "osmode", 3
Else
ThisDrawing.SetVariable "osmode", intOsmode
End If
Application.Preferences.User.ADCInsertUnitsDefaultSource = acInsertUnitsInches
Application.Preferences.User.ADCInsertUnitsDefaultTarget = acInsertUnitsInches
ThisDrawing.SetVariable "OSNAPZ", 1
End Sub
-
This?
Yes! Thanks Matt!
-
This?
Yes! Thanks Matt!
:kewl:
-
how to use it?? when I load the FloatingOSnaps.dvb,it tell me there is an error.it said the merroy overlay!!!
-
not sure what merroy overlay is (memory overflow?) but what version of AutoCAD are you trying it with?