"""


:author: Mathieu Gendron
:contact: 
:email: mgendron@theobjects.com
:organization: Object Research Systems (ORS), Inc.
:address: 
:copyright: 
:date: Mar 27 2019 10:02
:dragonflyVersion: 4.0.0.557
:UUID: d70d023b509811e997b6448a5b5d70c0
"""

__version__ = '1.0.2'

"""


:author: Mathieu Gendron
:contact: 
:email: mgendron@theobjects.com
:organization: Object Research Systems (ORS), Inc.
:address: 
:copyright: 
:date: Mar 27 2019 10:01
:dragonflyVersion: 4.0.0.557
:UUID: d70d023b509811e997b6448a5b5d70c0
"""

# Action log Wed Mar 27 10:03:51 2019

# Macro name: MeasureWithRulersAndExportToCSV

# ********** BEGIN MACRO ********** #
"""
Sets the currently active global state

:name: setCurrentGlobalState
:execution: execute

:param instance: context instance
:type instance: plugin instance
:param state: new state
:type state: str

:return globalStateChangeIsSuccessful: indicates if the change was successful
:rtype globalStateChangeIsSuccessful: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
instance = None

state = 'OrsStateRuler'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
globalStateChangeIsSuccessful = WorkingContext.setCurrentGlobalState(instance=instance,
                                                                     state=state)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# globalStateChangeIsSuccessful = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Creates an annotation.

:name: createPrimitive
:execution: execute

:param primitiveClass: the class of the annotation to create
:type primitiveClass: ORSModel.ors.Annotation class
:param aLayoutName: a layout genealogical name
:type aLayoutName: str
:param associatedState: edition associated state
:type associatedState: str

:return newAnnotation: the created annotation
:rtype newAnnotation: ORSModel.ors.Annotation
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
primitiveClass = ORSModel.ors.VisualRuler

aLayoutName = 'toplayout\\scene_0\\xy'

associatedState = 'OrsStateRulerEdit'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation = PrimitiveHelper.createPrimitive(primitiveClass=primitiveClass,
                                                aLayoutName=aLayoutName,
                                                associatedState=associatedState)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# newAnnotation = orsObj('9584308711449416651CxvPrimitive_Ruler')

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation: the annotation object to modify
:type newAnnotation: ORSModel.ors.Annotation
:param timeStep: time index of the annotation
:type timeStep: int
:param position: (X, Y, Z) coordinate of the new position
:type position: ORSModel.ors.Vector3

:return success: True if successful, False otherwise
:rtype success: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep = 0

position = orsVect(0.0180342484, 0.0195090962, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation,
                                          timeStep=timeStep,
                                          position=position)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation: the annotation object to modify
:type newAnnotation: ORSModel.ors.Annotation
:param timeStep_2: time index of the annotation
:type timeStep_2: int
:param position_2: (X, Y, Z) coordinate of the new position
:type position_2: ORSModel.ors.Vector3

:return success_2: True if successful, False otherwise
:rtype success_2: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep_2 = 0

position_2 = orsVect(0.0180342484, 0.0195090962, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_2 = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation,
                                            timeStep=timeStep_2,
                                            position=position_2)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_2 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation: the annotation object to modify
:type newAnnotation: ORSModel.ors.Annotation
:param controlPointIndex: index of the control point in the annotation
:type controlPointIndex: int
:param timeStep_3: time index of the annotation
:type timeStep_3: int
:param position_3: (X, Y, Z) coordinate of the new position
:type position_3: ORSModel.ors.Vector3

:return success_3: True if successful, False otherwise
:rtype success_3: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex = 0

timeStep_3 = 0

position_3 = orsVect(0.0180342484, 0.0195090962, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_3 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation,
                                                    controlPointIndex=controlPointIndex,
                                                    timeStep=timeStep_3,
                                                    position=position_3)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_3 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation: the annotation object to modify
:type newAnnotation: ORSModel.ors.Annotation
:param controlPointIndex_2: index of the control point in the annotation
:type controlPointIndex_2: int
:param timeStep_4: time index of the annotation
:type timeStep_4: int
:param position_4: (X, Y, Z) coordinate of the new position
:type position_4: ORSModel.ors.Vector3

:return success_4: True if successful, False otherwise
:rtype success_4: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_2 = 1

timeStep_4 = 0

position_4 = orsVect(0.0670261791, 0.0315884232, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_4 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation,
                                                    controlPointIndex=controlPointIndex_2,
                                                    timeStep=timeStep_4,
                                                    position=position_4)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_4 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setIsRepresentable
:execution: execute

:param newAnnotation: 
:type newAnnotation: ORSModel.ors.Managed
:param isRepresentable: 
:type isRepresentable: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
isRepresentable = True

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation.setIsRepresentable(isRepresentable=isRepresentable,
                                 logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets an object as representable and notifies the Dragonfly UI of a new available object

:name: publish
:execution: execute

:param newAnnotation: 
:type newAnnotation: ORSModel.ors.Managed
"""

# Interface method
newAnnotation.publish(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Calls for a setDirty with the flag OrsDataDirty

:name: setDataDirty
:execution: execute

:param newAnnotation: 
:type newAnnotation: ORSModel.ors.Managed
"""

# Interface method
newAnnotation.setDataDirty(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Creates an annotation.

:name: createPrimitive
:execution: execute

:param primitiveClass_2: the class of the annotation to create
:type primitiveClass_2: ORSModel.ors.Annotation class
:param aLayoutName_2: a layout genealogical name
:type aLayoutName_2: str
:param associatedState_2: edition associated state
:type associatedState_2: str

:return newAnnotation_2: the created annotation
:rtype newAnnotation_2: ORSModel.ors.Annotation
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
primitiveClass_2 = ORSModel.ors.VisualRuler

aLayoutName_2 = 'toplayout\\scene_0\\xy'

associatedState_2 = 'OrsStateRulerEdit'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_2 = PrimitiveHelper.createPrimitive(primitiveClass=primitiveClass_2,
                                                  aLayoutName=aLayoutName_2,
                                                  associatedState=associatedState_2)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# newAnnotation_2 = orsObj('4897308711065656651CxvPrimitive_Ruler')

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation_2: the annotation object to modify
:type newAnnotation_2: ORSModel.ors.Annotation
:param timeStep_5: time index of the annotation
:type timeStep_5: int
:param position_5: (X, Y, Z) coordinate of the new position
:type position_5: ORSModel.ors.Vector3

:return success_5: True if successful, False otherwise
:rtype success_5: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep_5 = 0

position_5 = orsVect(0.048972689, 0.00604719551, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_5 = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation_2,
                                            timeStep=timeStep_5,
                                            position=position_5)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_5 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation_2: the annotation object to modify
:type newAnnotation_2: ORSModel.ors.Annotation
:param timeStep_6: time index of the annotation
:type timeStep_6: int
:param position_6: (X, Y, Z) coordinate of the new position
:type position_6: ORSModel.ors.Vector3

:return success_6: True if successful, False otherwise
:rtype success_6: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep_6 = 0

position_6 = orsVect(0.048972689, 0.00604719551, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_6 = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation_2,
                                            timeStep=timeStep_6,
                                            position=position_6)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_6 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_2: the annotation object to modify
:type newAnnotation_2: ORSModel.ors.Annotation
:param controlPointIndex_3: index of the control point in the annotation
:type controlPointIndex_3: int
:param timeStep_7: time index of the annotation
:type timeStep_7: int
:param position_7: (X, Y, Z) coordinate of the new position
:type position_7: ORSModel.ors.Vector3

:return success_7: True if successful, False otherwise
:rtype success_7: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_3 = 0

timeStep_7 = 0

position_7 = orsVect(0.048972689, 0.00604719551, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_7 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_2,
                                                    controlPointIndex=controlPointIndex_3,
                                                    timeStep=timeStep_7,
                                                    position=position_7)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_7 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_2: the annotation object to modify
:type newAnnotation_2: ORSModel.ors.Annotation
:param controlPointIndex_4: index of the control point in the annotation
:type controlPointIndex_4: int
:param timeStep_8: time index of the annotation
:type timeStep_8: int
:param position_8: (X, Y, Z) coordinate of the new position
:type position_8: ORSModel.ors.Vector3

:return success_8: True if successful, False otherwise
:rtype success_8: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_4 = 1

timeStep_8 = 0

position_8 = orsVect(0.0436585569, 0.0540734357, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_8 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_2,
                                                    controlPointIndex=controlPointIndex_4,
                                                    timeStep=timeStep_8,
                                                    position=position_8)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_8 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setIsRepresentable
:execution: execute

:param newAnnotation_2: 
:type newAnnotation_2: ORSModel.ors.Managed
:param isRepresentable_2: 
:type isRepresentable_2: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
isRepresentable_2 = True

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_2.setIsRepresentable(isRepresentable=isRepresentable_2,
                                   logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets an object as representable and notifies the Dragonfly UI of a new available object

:name: publish
:execution: execute

:param newAnnotation_2: 
:type newAnnotation_2: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_2.publish(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Calls for a setDirty with the flag OrsDataDirty

:name: setDataDirty
:execution: execute

:param newAnnotation_2: 
:type newAnnotation_2: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_2.setDataDirty(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Creates an annotation.

:name: createPrimitive
:execution: execute

:param primitiveClass_3: the class of the annotation to create
:type primitiveClass_3: ORSModel.ors.Annotation class
:param aLayoutName_3: a layout genealogical name
:type aLayoutName_3: str
:param associatedState_3: edition associated state
:type associatedState_3: str

:return newAnnotation_3: the created annotation
:rtype newAnnotation_3: ORSModel.ors.Annotation
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
primitiveClass_3 = ORSModel.ors.VisualRuler

aLayoutName_3 = 'toplayout\\scene_0\\xy'

associatedState_3 = 'OrsStateRulerEdit'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_3 = PrimitiveHelper.createPrimitive(primitiveClass=primitiveClass_3,
                                                  aLayoutName=aLayoutName_3,
                                                  associatedState=associatedState_3)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# newAnnotation_3 = orsObj('1820408711639156651CxvPrimitive_Ruler')

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation_3: the annotation object to modify
:type newAnnotation_3: ORSModel.ors.Annotation
:param timeStep_9: time index of the annotation
:type timeStep_9: int
:param position_9: (X, Y, Z) coordinate of the new position
:type position_9: ORSModel.ors.Vector3

:return success_9: True if successful, False otherwise
:rtype success_9: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep_9 = 0

position_9 = orsVect(0.022110843, 0.0411209042, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_9 = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation_3,
                                            timeStep=timeStep_9,
                                            position=position_9)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_9 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation_3: the annotation object to modify
:type newAnnotation_3: ORSModel.ors.Annotation
:param timeStep_10: time index of the annotation
:type timeStep_10: int
:param position_10: (X, Y, Z) coordinate of the new position
:type position_10: ORSModel.ors.Vector3

:return success_10: True if successful, False otherwise
:rtype success_10: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep_10 = 0

position_10 = orsVect(0.022110843, 0.0411209042, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_10 = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation_3,
                                             timeStep=timeStep_10,
                                             position=position_10)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_10 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_3: the annotation object to modify
:type newAnnotation_3: ORSModel.ors.Annotation
:param controlPointIndex_5: index of the control point in the annotation
:type controlPointIndex_5: int
:param timeStep_11: time index of the annotation
:type timeStep_11: int
:param position_11: (X, Y, Z) coordinate of the new position
:type position_11: ORSModel.ors.Vector3

:return success_11: True if successful, False otherwise
:rtype success_11: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_5 = 0

timeStep_11 = 0

position_11 = orsVect(0.022110843, 0.0411209042, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_11 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_3,
                                                     controlPointIndex=controlPointIndex_5,
                                                     timeStep=timeStep_11,
                                                     position=position_11)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_11 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_3: the annotation object to modify
:type newAnnotation_3: ORSModel.ors.Annotation
:param controlPointIndex_6: index of the control point in the annotation
:type controlPointIndex_6: int
:param timeStep_12: time index of the annotation
:type timeStep_12: int
:param position_12: (X, Y, Z) coordinate of the new position
:type position_12: ORSModel.ors.Vector3

:return success_12: True if successful, False otherwise
:rtype success_12: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_6 = 1

timeStep_12 = 0

position_12 = orsVect(0.0290992907, 0.0485431414, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_12 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_3,
                                                     controlPointIndex=controlPointIndex_6,
                                                     timeStep=timeStep_12,
                                                     position=position_12)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_12 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setIsRepresentable
:execution: execute

:param newAnnotation_3: 
:type newAnnotation_3: ORSModel.ors.Managed
:param isRepresentable_3: 
:type isRepresentable_3: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
isRepresentable_3 = True

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_3.setIsRepresentable(isRepresentable=isRepresentable_3,
                                   logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets an object as representable and notifies the Dragonfly UI of a new available object

:name: publish
:execution: execute

:param newAnnotation_3: 
:type newAnnotation_3: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_3.publish(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Calls for a setDirty with the flag OrsDataDirty

:name: setDataDirty
:execution: execute

:param newAnnotation_3: 
:type newAnnotation_3: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_3.setDataDirty(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_2: the annotation object to modify
:type newAnnotation_2: ORSModel.ors.Annotation
:param controlPointIndex_7: index of the control point in the annotation
:type controlPointIndex_7: int
:param timeStep_13: time index of the annotation
:type timeStep_13: int
:param position_13: (X, Y, Z) coordinate of the new position
:type position_13: ORSModel.ors.Vector3

:return success_13: True if successful, False otherwise
:rtype success_13: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_7 = 0

timeStep_13 = 0

position_13 = orsVect(0.0490454854, 0.00539229223, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_13 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_2,
                                                     controlPointIndex=controlPointIndex_7,
                                                     timeStep=timeStep_13,
                                                     position=position_13)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_13 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_2: the annotation object to modify
:type newAnnotation_2: ORSModel.ors.Annotation
:param controlPointIndex_8: index of the control point in the annotation
:type controlPointIndex_8: int
:param timeStep_14: time index of the annotation
:type timeStep_14: int
:param position_14: (X, Y, Z) coordinate of the new position
:type position_14: ORSModel.ors.Vector3

:return success_14: True if successful, False otherwise
:rtype success_14: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_8 = 1

timeStep_14 = 0

position_14 = orsVect(0.0436585569, 0.0540734357, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_14 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_2,
                                                     controlPointIndex=controlPointIndex_8,
                                                     timeStep=timeStep_14,
                                                     position=position_14)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_14 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setIsRepresentable
:execution: execute

:param newAnnotation_2: 
:type newAnnotation_2: ORSModel.ors.Managed
:param isRepresentable_4: 
:type isRepresentable_4: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
isRepresentable_4 = True

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_2.setIsRepresentable(isRepresentable=isRepresentable_4,
                                   logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets an object as representable and notifies the Dragonfly UI of a new available object

:name: publish
:execution: execute

:param newAnnotation_2: 
:type newAnnotation_2: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_2.publish(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Calls for a setDirty with the flag OrsDataDirty

:name: setDataDirty
:execution: execute

:param newAnnotation_2: 
:type newAnnotation_2: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_2.setDataDirty(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setTitle
:execution: execute

:param newAnnotation: 
:type newAnnotation: ORSModel.ors.Managed
:param newVal: 
:type newVal: str
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
newVal = 'Width'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation.setTitle(newVal=newVal,
                       logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setTitle
:execution: execute

:param newAnnotation_2: 
:type newAnnotation_2: ORSModel.ors.Managed
:param newVal_2: 
:type newVal_2: str
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
newVal_2 = 'Another width'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_2.setTitle(newVal=newVal_2,
                         logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setTitle
:execution: execute

:param newAnnotation_3: 
:type newAnnotation_3: ORSModel.ors.Managed
:param newVal_3: 
:type newVal_3: str
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
newVal_3 = 'Bump1'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_3.setTitle(newVal=newVal_3,
                         logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Creates an annotation.

:name: createPrimitive
:execution: execute

:param primitiveClass_4: the class of the annotation to create
:type primitiveClass_4: ORSModel.ors.Annotation class
:param aLayoutName_4: a layout genealogical name
:type aLayoutName_4: str
:param associatedState_4: edition associated state
:type associatedState_4: str

:return newAnnotation_4: the created annotation
:rtype newAnnotation_4: ORSModel.ors.Annotation
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
primitiveClass_4 = ORSModel.ors.VisualRuler

aLayoutName_4 = 'toplayout\\scene_0\\xy'

associatedState_4 = 'OrsStateRulerEdit'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_4 = PrimitiveHelper.createPrimitive(primitiveClass=primitiveClass_4,
                                                  aLayoutName=aLayoutName_4,
                                                  associatedState=associatedState_4)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# newAnnotation_4 = orsObj('2602608711291426651CxvPrimitive_Ruler')

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation_4: the annotation object to modify
:type newAnnotation_4: ORSModel.ors.Annotation
:param timeStep_15: time index of the annotation
:type timeStep_15: int
:param position_15: (X, Y, Z) coordinate of the new position
:type position_15: ORSModel.ors.Vector3

:return success_15: True if successful, False otherwise
:rtype success_15: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep_15 = 0

position_15 = orsVect(0.0555971552, 0.00808467236, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_15 = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation_4,
                                             timeStep=timeStep_15,
                                             position=position_15)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_15 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Adds a control point in an annotation.

:name: addControlPoint
:execution: execute

:param newAnnotation_4: the annotation object to modify
:type newAnnotation_4: ORSModel.ors.Annotation
:param timeStep_16: time index of the annotation
:type timeStep_16: int
:param position_16: (X, Y, Z) coordinate of the new position
:type position_16: ORSModel.ors.Vector3

:return success_16: True if successful, False otherwise
:rtype success_16: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
timeStep_16 = 0

position_16 = orsVect(0.0555971552, 0.00808467236, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_16 = PrimitiveHelper.addControlPoint(anAnnotation=newAnnotation_4,
                                             timeStep=timeStep_16,
                                             position=position_16)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_16 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_4: the annotation object to modify
:type newAnnotation_4: ORSModel.ors.Annotation
:param controlPointIndex_9: index of the control point in the annotation
:type controlPointIndex_9: int
:param timeStep_17: time index of the annotation
:type timeStep_17: int
:param position_17: (X, Y, Z) coordinate of the new position
:type position_17: ORSModel.ors.Vector3

:return success_17: True if successful, False otherwise
:rtype success_17: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_9 = 0

timeStep_17 = 0

position_17 = orsVect(0.0555971552, 0.00808467236, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_17 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_4,
                                                     controlPointIndex=controlPointIndex_9,
                                                     timeStep=timeStep_17,
                                                     position=position_17)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_17 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets the position of a control point.

:name: setControlPointPosition
:execution: execute

:param newAnnotation_4: the annotation object to modify
:type newAnnotation_4: ORSModel.ors.Annotation
:param controlPointIndex_10: index of the control point in the annotation
:type controlPointIndex_10: int
:param timeStep_18: time index of the annotation
:type timeStep_18: int
:param position_18: (X, Y, Z) coordinate of the new position
:type position_18: ORSModel.ors.Vector3

:return success_18: True if successful, False otherwise
:rtype success_18: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
controlPointIndex_10 = 1

timeStep_18 = 0

position_18 = orsVect(0.0629495846, 0.0155796765, 0.034653)

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
success_18 = PrimitiveHelper.setControlPointPosition(anAnnotation=newAnnotation_4,
                                                     controlPointIndex=controlPointIndex_10,
                                                     timeStep=timeStep_18,
                                                     position=position_18)

# ----- BEGIN RETURNED VALUES DEFINITION ----- #
# success_18 = True

# ----- END RETURNED VALUES DEFINITION ----- #
# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setIsRepresentable
:execution: execute

:param newAnnotation_4: 
:type newAnnotation_4: ORSModel.ors.Managed
:param isRepresentable_5: 
:type isRepresentable_5: bool
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
isRepresentable_5 = True

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_4.setIsRepresentable(isRepresentable=isRepresentable_5,
                                   logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Sets an object as representable and notifies the Dragonfly UI of a new available object

:name: publish
:execution: execute

:param newAnnotation_4: 
:type newAnnotation_4: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_4.publish(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Calls for a setDirty with the flag OrsDataDirty

:name: setDataDirty
:execution: execute

:param newAnnotation_4: 
:type newAnnotation_4: ORSModel.ors.Managed
"""

# Interface method
newAnnotation_4.setDataDirty(logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
:name: setTitle
:execution: execute

:param newAnnotation_4: 
:type newAnnotation_4: ORSModel.ors.Managed
:param newVal_4: 
:type newVal_4: str
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
newVal_4 = 'Bump2'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
newAnnotation_4.setTitle(newVal=newVal_4,
                         logging=True)

# ********** END MACRO ********** #

# ********** BEGIN MACRO ********** #
"""
Exports ruler information in a CSV file

:name: exportRulerPropertiesToCSV
:execution: pause

:param listOfRulers: rulers to put in the CSV file
:type listOfRulers: ORSModel.ors.VisualRuler
:count listOfRulers: [1, None]
:param filename: CSV file name
:type filename: file saving
"""

# ----- BEGIN INPUT ARGUMENT DEFINITION ----- #
listOfRulers = [newAnnotation_4,
                newAnnotation_3,
                newAnnotation_2,
                newAnnotation]

# filename = 'C:/tmp/Demos/test2.csv'

# ----- END INPUT ARGUMENT DEFINITION ----- #
# Interface method
DemoMenuItemSaveRulerPropertiesToCSV_20752218509311e9a5de448a5b5d70c0.exportRulerPropertiesToCSV(listOfRulers=listOfRulers,
                                                                                                 filename=filename)

# ********** END MACRO ********** #

