need help in controlling rubberbanding to 90 degrees

Discussion in 'AutoCAD' started by Kevin L., Dec 10, 2004.

  1. Kevin L.

    Kevin L. Guest

    I'm more at home using lisp for autocad, but moving my programs
    to Vba and need help with a substitue for ortho to controling the
    line drawing to a 90 degree direction.

    have tried orthoon in vba but it changes the snap to isometrics if i use
    a modified version of the example in the help file shown below.

    Set objViewport = ThisDrawing.ActiveViewport
    OrthoModeSaved = objViewport.OrthoOn
    If (ThisDrawing.ActiveViewport.OrthoOn = True) Then
    ' MsgBox "Ortho is on", vbInformation
    Else
    ' MsgBox "Ortho is off", vbInformation
    objViewport.OrthoOn = Not objViewport.OrthoOn
    End If

    is the better way to control the visual and final drawing of the
    block to using the program to only show the rubberbanding in
    the x or y direction.

    thanks kevin
     
    Kevin L., Dec 10, 2004
    #1
  2. Kevin L.

    rwilkins Guest

    From the Help File:
    Specifies the status of the Isometric snap mode for the viewport.


    Signature

    object.OrthoOn

    object

    Viewport
    The object or objects this property applies to.

    OrthoOn

    Boolean; read-write See Also | Example


    TRUE: Isometric snap mode is on.

    FALSE: Isometric snap mode is off.



    If you are trying to turn ORTHO on then use:
    Dim UserOrthoMode As Integer
    UserOrthoMode = ThisDrawing.GetVariable("ORTHOMODE")
    ThisDrawing.SetVariable "ORTHOMODE", 1
    ThisDrawing.SetVariable "ORTHOMODE", UserOrthoMode
     
    rwilkins, Dec 10, 2004
    #2
  3. Kevin L.

    Kevin L. Guest

    thanks for the reply and that was what I needed to make the
    routine work correctly. also thanks, had not known of the
    setvarible option in vba. changeing to vba, get tired of spending
    most of my time trouble shooting if statement in vlisp that don't
    go where you programmed them to go..

    in the acad 2000 help on orthoon it does not explain that it
    controllers the isometeric snap angle. I expected ortho to
    do like the ortho button at the bottom of the screen or like
    in vlisp the orthomode does.
     
    Kevin L., Dec 13, 2004
    #3
  4. Kevin L.

    Kevin L. Guest

    thanks, that what I needed, have never seen setvariable but
    will use it in the future. won't use orthoon even through acad
    2000 help looks like that is what it is for..

    kevin
     
    Kevin L., Dec 15, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.