VBA PropertyHandler SetValue method

Hello everybody!

AECOsim v8i ss6

ver. 08.11.09.866

When i create a SvedView from active view(1) the size of SavedView borders is equal to view(1) window size as it is.

So, after creating i need to change its borders, because i dont need some objects in drawing.

I want to change Extents.X for example.

What i exactly try:

Dim ele As SavedViewElement
    Dim oPH As PropertyHandler
    
       Set ele = ActiveDesignFile.FindSavedView("test_view")
       Set oPH = CreatePropertyHandler(ele)
       oPH.SelectByAccessString ("Extents.X")
       
       oPH.setValue "650"

I suppose mistake is in property names or syntax...

Could you advice how it should be?

Parents Reply
  • Use AccessStrings method to retrieve all available access strings and try to identify what "your string" can be.

    Thank you for advice. Using AccessStrings i found the Name of Property. It is "Extents". Without any additional ".X", ".Y" etc.

    Another proplem was how to SetValue for this Property.

    Then we found how to change it. It should be assigned a Point3d for "object.Extents" property. X, Y and Z value of Point3d are applied to X and Y values of SavedView Extents. Z value have no meaning, because ActiveDepth defined for View before creating of SavedView is assigned for it already.

    *Upd.:  SetValueAsPoint3d(NewValue As Point3d) should be used.

Children
No Data