[V8i VBA] SavedViewElement & RotateAboutZ

Hi all

Hopefully a quickie here... I'm working on a routine to reposition Saved Views in a file. The SavedViewElement has a method "RotateAboutZ" but it can't be applied as SavedViewElement is a non-graphical element. Can someone point out a quick way of getting this to work? If not, I guess I'll just need to start to get my head around the maths for rotating the CameraTarget & CameraPosition properties manually .

Thanks, I hope

Nigel

Parents
  • NigelPDavies said:
    The SavedViewElement has a method ...

    The problem arises because the SavedViewElement inherits a number of properties & methods from Element.  Not all properties & methods are applicable to a non-graphic element, but there's no way in VBA of removing those.  The documentation doesn't tell you which methods are not applicable.

    Using VBA, I don't think there is a way to do what you want.  As far as I can see, we need the C++ MicroStationAPI to manipulate NamedView information.  You can't get at the MicroStationAPI from VBA because VBA doesn't understand C++.

    Saved View or Named View?

    There may be a naming confusion: saved views have been around for donkey's years (they were available in MicroStation/J).  Named views are more recent, and store more information (such as camera position) than a saved view.  I think the VBA object is the older saved view.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: NigelPDavies 

Reply
  • NigelPDavies said:
    The SavedViewElement has a method ...

    The problem arises because the SavedViewElement inherits a number of properties & methods from Element.  Not all properties & methods are applicable to a non-graphic element, but there's no way in VBA of removing those.  The documentation doesn't tell you which methods are not applicable.

    Using VBA, I don't think there is a way to do what you want.  As far as I can see, we need the C++ MicroStationAPI to manipulate NamedView information.  You can't get at the MicroStationAPI from VBA because VBA doesn't understand C++.

    Saved View or Named View?

    There may be a naming confusion: saved views have been around for donkey's years (they were available in MicroStation/J).  Named views are more recent, and store more information (such as camera position) than a saved view.  I think the VBA object is the older saved view.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: NigelPDavies 

Children