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 Children
  • Hello Jon, so many time it is how you or where you search questions. I will go back and see If I can find it. So I guess there is no Key-in ? Thanks for your help I am going to test it out.

    RJB Phillips III - Praise the Lord for His Mercy and Grace

  • Hi,

    thats what my Macro Recorder spits out:

    MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Fill False

    or 

    MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Fill True

    if you want to set Fill on.

    Regards, Stefan.

  • Hello, I tried the VBA command, it faulted, I will now go try your suggestion and thank you for the reply I wanted to put in the picture, but when I select rich formatting I end up at a new post???? Phil any suggestions?

    RJB Phillips III - Praise the Lord for His Mercy and Grace

  • RJB said:

    I wanted to put in the picture, but when I select rich formatting I end up at a new post???? Phil any suggestions?

    When you click the "Use rich formatting" link, you should get something like this

    If you are seeing something different, would you mind starting up a thread in the Be Communities Feedback Forum?

      

  • I really wanted a direct key-in or V8i as first choice, but Stefan the MDL routines did work to turn the fill on. I am going to try and work that in. Is there a toggle command for this or only the true and false?

    RJB Phillips III - Praise the Lord for His Mercy and Grace

  • This what I used to see in the older help, but I tried twice and it went to make a new post and start over so I hit the back arrow at the top and got the message are you sure you want to leave this "reminded me of the FB commands" Should I try and get a snip of the screen I get? Will have to get back to this problem

    RJB Phillips III - Praise the Lord for His Mercy and Grace

  • The Above reply did in fact work and I appreciate the help, but I was hoping for a VBA or Key-in because I already have VBA that sets the line weights and datafields, so I was in hopes of adding another line of code for the view fill, the suggestions from Jon failed for me?

    Unable to paste any new items, I see the new post option, but then it wants to leave this screen. I do not see any option for attach? as soon as I click rich format I end up over here??

    RJB Phillips III - Praise the Lord for His Mercy and Grace

  • Phil, unable to add the pictures. You do not the what  you showed and unable to post the two .jpg to show you any other possible suggestions? When I click the use rich formatting below, I go to another page, but there is no display in the quote section on only text like this <p> and then the text I just typed if I pick the option tab and try and load the picture it shows loaded but still will not display it.

    RJB Phillips III - Praise the Lord for His Mercy and Grace

  • 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

  • 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.