V8i VBA view attributes fill on/off or V8I Key-in

I know about Ctrl B and click them on or off, but since the following work in VBA '[1] new ActiveDesignFile.Views(1).DisplaysDataEntryRegions = False ActiveDesignFile.Views(1).DisplaysLineWeights = True ActiveDesignFile.Views(1).Redraw What would I put for the fill to be on or off? I did search through the key-in set fill and set view, but could not figure out how to do it I have a vba routine that sets most of my needs for each new drawing, but found this fill was my problem on more that one drawing, so I was going to attempt to remove the problem and turn it on?
Parents Reply
  • RJB said:
    I tried the VBA command, it faulted

    The following works for me...

    ' ---------------------------------------------------------------------
    '   TestViewSettings
    '   Test procedure.  Key-in:
    '   vba run TestViewSettings
    ' ---------------------------------------------------------------------
    Sub TestViewSettings()
        Const viewNum As Integer = 1
        If ActiveDesignFile.Views(viewNum).IsOpen Then
            ViewSettings viewNum
        Else
            Debug.Print "View " & CStr(viewNum) & " is not open"
        End If
    End Sub
    ' ---------------------------------------------------------------------
    '   Set desired attributes of view
    ' ---------------------------------------------------------------------
    Sub ViewSettings(ByVal viewNum As Integer)
        With ActiveDesignFile
            .Views(viewNum).DisplaysDataEntryRegions = False
            .Views(viewNum).DisplaysLineWeights = True
            .Views(viewNum).DisplaysFill = True
            .Views(viewNum).Redraw
        End With
    End Sub

     
    Regards, Jon Summers
    LA Solutions

Children
  • Hi,

    I concluded from your question that you wanted a keyin that works in the key-in dialog in Microstation.

    (That is:  MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Fill True)

    You can even wrap this into VBA like CadInputQueue.SendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Fill True")

    But indeed, the API Function Jon mentioned is better coding style and works fine for me too. I even doubt that it is a problem of the Microstation version you use. So you should try again and implement Jons sample and tell us if it works for you .

    Regards, Stefan.