Using API to select defined view



  • Is there a way to use the API to select one of the predefined views from the list of viewpoints defined for a vehicle?



  • @rr said in Using API to select defined view:

    Is there a way to use the API to select one of the predefined views from the list of viewpoints defined for a vehicle?

    Yes, you can use the ANVEL Commands UseVehicleView and CycleVehicleView from the External API to accomplish this. In Python, it would look like:

    #create vehicle
    veh = anv.CreateObject('Generic 4x4', 'myVeh', 0, Point3(0, 0, 0), Euler(0, 0, 0), True)
    
    # set camera to default vehicle view and then cycle it to the next view
    anv.SendStringCommand('Vehicles.UseVehicleView',str(veh.objectKey))
    anv.SendStringCommand('Vehicles.CycleVehicleView',str(veh.objectKey))
    

    The full list of ANVEL Commands is also available. Hopefully this helps!

    Regards,
    ANVEL Support



  • @ANVEL-Team Awesome! Somehow I missed this one. Thanks.


Log in to reply
 

Looks like your connection to ANVEL Forum was lost, please wait while we try to reconnect.