Differences between the CorelDRAW 10 and the CorelDRAW 11 object models

Some names and parameters were revised when the object model was updated from CorelDRAW 10 to CorelDRAW 11. In order to ensure that a macro written for CorelDRAW 10 will work as designed in CorelDRAW 11, you might need to change the name of the class, method, or property, or change parameters for macros. The following list of classes identifies changes which might require that you update a macro.

 

The following classes have been renamed:

· Class Points - renamed to the SnapPointsIDH_SnapPoints>Main class

· Class Printers - renamed to the SystemPrintersIDH_SystemPrinters>Main class

· Class ShapePoint - renamed to the SnapPointIDH_SnapPoint>Main class

 

The following properties and methods have been renamed:

Class Application

· Function CreateShapePoint - renamed to the CreateSnapPointIDH_Application_CreateSnapPoint>Main method

 

Class EffectBlend

· Property EndShapePoint - renamed to the EndPointIDH_EffectBlend_EndPoint>Main property

· Property StartShapePoint - renamed to StartPointIDH_EffectBlend_StartPoint>Main property

 

Class Shape

· Property Points - renamed to the SnapPointsIDH_SnapPoints>Main property

 

The following parameters have changed:

Class Layer

· Sub ImportIDH_Layer_Import>Main - the optional parameter, MaintainLayersAndPages, has been changed to Options and returns StructImportOptions.

· Old: Sub Import(ByVal FileName As String, [ByVal Filter As cdrFilter = cdrAutoSense (0)], [ByVal MaintainLayersAndPages As Boolean = False])

· New: Sub Import(ByVal FileName As String, [ByVal Filter As cdrFilter = cdrAutoSense (0)], [ByVal Options As StructImportOptions = Nothing])

 

Class NodeRange

· Sub RotateIDH_NodeRange_Rotate>Main - the optional parameter, UseReferencePoint, has been changed to UseCenterPoint and has a default value of False.

· Old: Sub Rotate(ByVal Angle As Double, [ByVal UseReferencePoint As Boolean = True], [ByVal RotationCenterX As Double = 0], [ByVal RotationCenterY As Double = 0])

· New: Sub Rotate(ByVal Angle As Double, [ByVal UseCenterPoint As Boolean = False], [ByVal RotationCenterX As Double = 0], [ByVal RotationCenterY As Double = 0])

· Sub SkewIDH_NodeRange_Skew>Main - the optional parameter, UseReferencePoint, has been changed to UseAnchorPoint and has a default value of False.

· Old: Sub Skew([ByVal AngleX As Double = 0], [ByVal AngleY As Double = 0], [ByVal UseReferencePoint As Boolean = True], [ByVal SkewAnchorX As Double = 0], [ByVal SkewAnchorY As Double = 0])

· New: Sub Skew([ByVal AngleX As Double = 0], [ByVal AngleY As Double = 0], [ByVal UseAnchorPoint As Boolean = False], [ByVal SkewAnchorX As Double = 0], [ByVal SkewAnchorY As Double = 0])

· Sub StretchIDH_NodeRange_Stretch>Main - the optional parameter, UseReferencePoint, has been changed to UseAnchorPoint and has a default value of False; the values for the parameters, RatioX and RatioY, are now expressed as multiples of the current width and height respectively.

· Old: Sub Stretch([ByVal RatioX As Single = 100], [ByVal RatioY As Single = 100], [ByVal UseReferencePoint As Boolean = False], [ByVal StretchAnchorX As Double = 0], [ByVal StretchAnchorY As Double = 0])

· New: Sub Stretch([ByVal RatioX As Single = 1], [ByVal RatioY As Single = 1], [ByVal UseAnchorPoint As Boolean = True], [ByVal StretchAnchorX As Double = 0], [ByVal StretchAnchorY As Double = 0])

 

Class Segment

· Sub GetPointPositionAtIDH_Segment_GetPointPositionAt>Main - the two required parameters, X and Y, have been moved to the front of the parameter list.

· Old: Sub GetPointPositionAt( [ByVal Offset As Double = 0.5], [ByVal OffsetType As cdrSegmentOffsetType = cdrParamSegmentOffset (2)], ByRef X As Double, ByRef Y As Double)

· New: Sub GetPointPositionAt(ByRef X As Double, ByRef Y As Double, [ByVal Offset As Double = 0.5], [ByVal OffsetType As cdrSegmentOffsetType = cdrParamSegmentOffset (2)])

 

Class Shape

· Sub SetSizeExIDH_Shape_SetSizeEx>Main - the two required parameters, CenterX and CenterY, have been moved to the front of the parameter list.

· Old: Sub SetSizeEx([ByVal Width As Double = 0], [ByVal Height As Double = 0], ByVal CenterX As Double, ByVal CenterY As Double)

· New: Sub SetSizeEx(ByVal CenterX As Double, ByVal CenterY As Double, [ByVal Width As Double = 0], [ByVal Height As Double = 0])

· Sub StretchExIDH_Shape_StretchEx>Main - the two parameters, CenterX and CenterY, have been moved to the front of the parameter list.

· Old: Sub StretchEx(ByVal StretchX As Double, [ByVal StretchY As Double = 0], ByVal CenterX As Double, ByVal CenterY As Double = 0, [ByVal StretchCharactersSize As Boolean = False])

· New: Sub StretchEx(ByVal CenterX As Double, ByVal CenterY As Double, ByVal StretchX As Double, [ByVal StretchY As Double = 0], [ByVal StretchCharactersSize As Boolean = False])

 

Class ShapeRange

· Sub SetSizeExIDH_ShapeRange_SetSizeEx>Main - the two required parameters, CenterX and CenterY, have been moved to the front of the parameter list.

· Old: Sub SetSizeEx([ByVal Width As Double = 0], [ByVal Height As Double = 0], ByVal CenterX As Double, ByVal CenterY As Double)

· New: Sub SetSizeEx(ByVal CenterX As Double, ByVal CenterY As Double, [ByVal Width As Double = 0], [ByVal Height As Double = 0])

· Sub StretchExIDH_ShapeRange_StretchEx>Main - the two parameters, CenterX and CenterY, have been moved to the front of the parameter list.

· Old: Sub StretchEx(ByVal StretchX As Double, [ByVal StretchY As Double = 0], ByVal CenterX As Double, ByVal CenterY As Double, [ByVal StretchCharactersSize As Boolean = False])

· New: Sub StretchEx(ByVal CenterX As Double, ByVal CenterY As Double, ByVal StretchX As Double, [ByVal StretchY As Double = 0], [ByVal StretchCharactersSize As Boolean = False])

 

Class SubPath

· Function AppendCurveSegmentIDH_SubPath_AppendCurveSegment>Main - the optional parameter, AppendAtBeginning, has been moved to the end of the parameter list.

· Old: Function AppendCurveSegment([ByVal AppendAtBeginning As Boolean = False], ByVal X As Double, ByVal Y As Double, [ByVal StartingControlPointLength As Double = -1], [ByVal StartingControlPointAngle As Double = 0], [ByVal EndingControlPointLength As Double = -1], [ByVal EndingControlPointAngle As Double = 0]) As Segment

· New: Function AppendCurveSegment(ByVal X As Double, ByVal Y As Double, [ByVal StartingControlPointLength As Double = -1], [ByVal StartingControlPointAngle As Double = 0], [ByVal EndingControlPointLength As Double = -1], [ByVal EndingControlPointAngle As Double = 0], [ByVal AppendAtBeginning As Boolean = False]) As Segment

· Function AppendLineSegmentIDH_SubPath_AppendLineSegment>Main - the optional parameter, AppendAtBeginning, has been moved to the end of the parameter list.

· Old: AppendLineSegment([ByVal AppendAtBeginning As Boolean = False], ByVal X As Double, ByVal Y As Double, ) As Segment

· New: Function AppendLineSegment(ByVal X As Double, ByVal Y As Double, [ByVal AppendAtBeginning As Boolean = False]) As Segment

· Sub GetPointPositionAtEndSelectionEndIDH_SubPath_GetPointPositionAt>Main - the two required parameters, X and Y, have been moved to the front of the parameter list.

· Old: Sub GetPointPositionAt([ByVal Offset As Double = 0.5], [ByVal OffsetType As cdrSegmentOffsetType = cdrRelativeSegmentOffset (1)], ByRef X As Double, ByRef Y As Double)

· New: Sub GetPointPositionAt(ByRef X As Double, ByRef Y As Double, [ByVal Offset As Double = 0.5], [ByVal OffsetType As cdrSegmentOffsetType = cdrRelativeSegmentOffset (1)])