TheSwamp

Code Red => VB(A) => Topic started by: FengK on September 27, 2008, 05:28:56 PM

Title: Where is Matt W's Favorite OSMODE Program?
Post 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.
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: mjfarrell on September 28, 2008, 08:08:10 AM
Might it have been this topic: http://www.theswamp.org/index.php?topic=503.0 (http://www.theswamp.org/index.php?topic=503.0)
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: David Hall on September 29, 2008, 01:29:03 AM
I have a startup macro that looks at login name and sets based on that.  I can post tomorrow from work
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: FengK on September 29, 2008, 02:54:37 AM
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.
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: FengK on September 29, 2008, 02:54:53 AM
I have a startup macro that looks at login name and sets based on that.  I can post tomorrow from work

Thanks!
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: Matt__W on September 29, 2008, 08:23:08 AM
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?
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: David Hall on September 29, 2008, 10:32:46 AM
or this?
Code: [Select]
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
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: FengK on September 29, 2008, 01:04:05 PM
This?

Yes! Thanks Matt!
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: Matt__W on September 29, 2008, 01:05:13 PM
This?

Yes! Thanks Matt!

 :kewl:
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: bybyby on October 31, 2008, 11:32:26 PM
how to use it?? when I load the FloatingOSnaps.dvb,it tell me there is an error.it said the merroy overlay!!!
Title: Re: Where is Matt W's Favorite OSMODE Program?
Post by: Bob Wahr on October 31, 2008, 11:47:14 PM
not sure what merroy overlay is (memory overflow?) but what version of AutoCAD are you trying it with?