What’s New in FlexPro 9’s Object Model
The following sections provide you with detailed information on all of the changes to the FlexPro object model. The changes made to the FlexPro 9 Automation object model since the previous version are backward compatible enhancements. You therefore only have to modify your programs written for FlexPro 8 if you want to use the new FlexPro 9 features. Otherwise, all you have to do is recompile the program.
If you would like to import macros or Automation code from FlexPro 6 or FlexPro 7 to FlexPro 9, you should first make the modifications listed in What's New in FlexPro 7's Object Model and What's New in FlexPro 8's Object Model.
New Objects
The Media object represents the new presentation object called Media. As with the other presentation objects, it is derived from the DocObject object.
The FileDialog object represents a file selection dialog box, which you can request via the new FileDialog property of the Application object. In this context, the FileDialogFilter object and the two collections called FileDialogFilters and FileDialogSelectedItems are also available.
The CursorProperties object is returned by the FpCursor object and represents the settings on the Cursors tab of the diagram to which the cursor is assigned.
The CustomFPScriptFunctions collection contains all registered custom FPScript functions that are represented by the new CustomFPScriptFunction object.
The CustomFPScriptFunctionParameters collection contains the custom FPScript function parameters, which are represented by the new CustomFPScriptFunctionParameter object.
The CustomFPScriptConstants collection contains all registered custom FPScript constants that are represented by the new CustomFPScriptConstant object.
The SignalSamplingAnalysis object represents the new analysis object called Signal Sampling.
The Approximation2DAnalysis object represents the new analysis object called 2D Approximation.
Enhancements to Existing Objects
The Global object and the Application object have been expanded to include the CustomFPScriptFunctions and CustomFPScriptConstants properties, which return the collections of the same name. The Application object was additionally expanded to include the property DecimalSeparator property with which you can define the decimal and list separators. The new FileDialog property was already described above.
The Database object, which represents the project database, has been expanded to include the properties FPScriptDecimalsAsFloat, ComplexOutputMode, PercentageCalculation, UnitCollectionsEnabled and UnitControlLevel. FPScriptDecimalsAsFloat determines whether figures without a decimal point are to be interpreted in FPScript as floating point values or integers. ComplexOutputMode determines the output format of complex numbers. PercentageCalculation enables or disables calculation of percentages in FPScript, UnitCollectionsEnabled defines which additional unit collections are to be used, and UnitControlLevel determines the FlexPro unit monitoring mode.
The Folder object, which represents a folder in the project database, has been expanded to include the AddFromTemplate method with which you can add new objects based on a template.
The FpObjectParameter object, which represents a parameter in the parameter list of any FlexPro object, has been expanded to include the Unit property. You can use it to access the unit of a parameter.
The FpObject object, which represents any FlexPro object, has been expanded to include the UpdateViews property. You can use this property to temporarily prevent updating of object views, thus increasing the performance when changing multiple object attributes in a row.
The ValueObject object, which represents a data object, has been expanded to include the properties DataUnit, DataUnitY, DataUnitX, DataUnitZ, Quantity, QuantityY, QuantityX, QuantityZ and QuantityOrCommentsOrName. The DataUnit properties return the current unit of a data component. The data is transformed to the new unit to permit write access to these properties. The Quantity properties access the new Quantity attribute in the data object header information.
The CursorObject object has been expanded to include the properties SynchronizeYZoom, ZoomAllCurves, AxisAdjustment, PlaybackRate and PlaybackIncrement. The Object argument of the AutoZoom property became obsolete in FlexPro 9 and is only supported for backward compatibility. It is now declared as an option.
The FpCursor object, which represents a data cursor, has been expanded to include the RemoveAllMarkers method. You can use it to remove all markers on the curve under the cursor. The PlayReverse method is used to animate the cursor, and the PlaceImageMarker is used to set image markers. The new Markers property returns the Markers collection, which represents the markers of the curve under the cursor, and the Properties property provides the CursorProperties object, which represents the settings on the Cursors tab of the assigned diagram.
The Axis2DScaling and Axis3DScaling objects, which represent 2D or 3D axis scaling, have been expanded to include the properties CurrentDivision, Unit, CurrentUnit and CurrentUnitInBrackets. CurrentDivision provides the currently valid division interval. With Unit you can define an output unit for the axis and thus for all axes over your scaled curves. CurrentUnit and CurrentUnitInBrackets provide the currently valid unit symbol for the axis. This corresponds to either Unit or is a result of the units of the data sets.
The ColumnTableColumnData and ColumnTableColumnColumnIndex objects, which represent the data column or column index row of a column table, have been expanded to include the Unit, CurrentUnit and CurrentUnitInBrackets properties. The purpose of these properties is the same as that of the axes.
The ImportSettings object has been expanded to include the UnitProcessing property. The property corresponds to the Units field in the Import dialog box.
The CFCFilterAnalysis object has been expanded to include the Algorithm property, which can be used to configure the filter algorithm.
The ApproximationAnalysis object has been expanded to include the UseCustomModel and CustomModel properties, which can be used to specify the custom element functions for the approximation.
The SignalCorrectionAnalysis object has been expanded to include the CorrectionValue property, which can be used to set the correction value.
The Markers collection has been expanded to include the LabelWidth, LabelHeight, ImageWidth and ImageHeight properties, which can be used to set the size of text and image markers. The new ImageSource and Media properties can be used to set up a Media object as the image source for image markers.
The Marker object has been expanded to include the Width and Height properties, which can be used to set the size of the text box or image of the marker.
The new WindowActivatedevent, which signals the activation of a window, has been added to the objects Windows and Window.
New Enumeration Types
The following enumeration types were recently added: FpAxisAdjustment, FpApprox2DResult, FpApproximation2DElementFunction, FpMarkerImageSource, FpParameterStructure, FpParameterType, FpSignalSamplingResult, FpTemplateType, FpUnitControlLevel,FpDecimalSeparator, FpComplexOutputMode, FpUnitProcessing, FpFileDialogType, FCFilterAlgorithm and FpMediaTimeBase.
Enhancements to Existing Enumeration Types
The FpObjectType enumeration type now includes the fpObjectTypeSignalSampling and fpObjectTypeApproximation2D elements.
The FpSignalCorrectionOperation enumeration type now includes the fpSignalCorrectionOperationReplace element.
The FpCursorPeakMode enumeration type now includes the fpCursorPeakModeMarker and fpCursorPeakModeMarkerMinMax elements.
The FpEventIsolationResult enumeration type now includes the elements fpEventIsolationResultInterpolate and lfpEventIsolationResultSetVoidMatches.
The FpSearchItem enumeration type now includes the fpSearchItemQuantity element.
The FpSurfaceInterpolationType enumeration type now includes the fpSurfaceInterpolationTypeNaturalNeighborConvex element.
The FpStatisticQuantity enumeration type now includes the fpStatisticQuantityCrestFactor element.
The FpExportFormat enumeration type now includes the elements fpExportFormatCellTablesAsTXT, lfpExportFormatColumnTablesAsTXT, fpExportFormatTextsAsTXT and fpExportFormatFlexProText3.
The FpObjectsToExportInFolders enumeration type now includes the fpExportMedia element.
In the FpIndicatorScaling enumeration type the fpIndicatorScalingAbsolute element was renamed to fpIndicatorScalingAbsolutePosition, the element fpIndicatorScalingRelative was renamed to fpIndicatorScalingAbsoluteError and the element fpIndicatorScalingPercent was renamed to fpIndicatorScalingRelativeErrorPercent. The previous names are still supported, but should be replaced in your VBA code.