|
|
Python reference: ViewParameters |
The class ViewParameters represents the C API structure TViewParameters.
To create an instance of ViewParameters, call the Model property defaultViewParameters and then modify the attributes as required.
params = model.defaultViewParameters
The attributes of ViewParameters are the same as in TViewParameters and take the same values. There are additional attributes which provide convenient alternatives to handle attributes:
RelativeToObject provides an alternative to RelativeToObjectHandle, allowing an OrcaFlex object to be used instead of a handle.DisturbanceVessel provides an alternative to DisturbanceVesselHandle, allowing an OrcaFlex object to be used instead of a handle.Filter provides an alternative to FilterHandle, allowing a ViewFilter object to be used instead of a handle.You can use either the handle attribute or its corresponding class based alternative, both approaches will work. However, it is generally more convenient to use the class based alternatives. For example:
params = model.defaultViewParameters
filter = OrcFxAPI.ViewFilter()
filter.Add(...)
params.Filter = filter
# equivalent to the above, but slightly more verbose
params.FilterHandle = filter.handle