What’s New in FlexPro 8’s Object Model

23.08.2021

The following sections provide you with detailed information on all of the changes to the FlexPro object model. Most of the changes to the FlexPro 8 Automation object model made since the previous version are backwards compatible enhancements. These changes, which require VBA code adjustments, are highlighted in color below. If you work with a compiler language, you will definitely need to import the FlexPro 8 type library and recompile your program. If you would like to import macros or Automation code from FlexPro 6 to FlexPro 8, you should first make the modifications listed in What's New in FlexPro 7's Object Model .

Changes and Enhancements to Analysis Objects and Other Data Objects

All data objects were expanded to include the properties DataTypeX, DataTypeY and DataTypeZ. These variants without an additional argument are also displayed in the FlexPro Properties window. The UnitInBrackets properties were expanded to include an optional argument with which you can select the type of bracket to use. In addition, the properties for setting the data range, LowerRangeLimitY, UpperRangeLimitY, LowerRangeLimitX, UpperRangeLimitX, LowerRangeLimitZ and UpperRangeLimitZ as well as the corresponding variants with an additional argument that selects the component, LowerRangeLimit and UpperRangeLimit were added.

In the Signal Analysis analysis object, the result can now be smoothed after derivation. The SignalAnalysis object has therefore been expanded to include the SmoothAfterDerivation and SmoothingWidth properties.

The StatisticQuantityAnalysis object has been expanded to include the properties Composed, XDataSet and ZDataSet so that the source data components can also be specified as separate data sets.

In the RainflowCountAnalysis object, the property IncludeResidue has been replaced by the Residue property, which offers additional options. Thus, ".IncludeResidue = True" needs to be converted in the VBA to ".Residue = fpRainflowCountResidueInclude" and correspondingly ".IncludeResidue = False" needs to be converted to ".Residue = fpRainflowCountResidueExclude".

The EventIsolation analysis object now also processes sequences of events and supports additional events. Therefore, the EventIsolation object now also includes the new EventIsolations collection. All properties related to an event have been copied to the new EventIsolation object. Therefore, in the VBA code, expressions such as ".Event" need to be converted to ".EventIsolations(1).Event".

Some analysis options have been expanded to include new procedures, and the Human Body Vibrations option has been added. The objects LoudnessAnalysis (Acoustics Option), CFCFilterAnalysis (Digital Filters Option), HumanBodyVibrationAnalysis and HandVibrationAnalysis (both part of the Human Body Vibrations option) were added.

The new analysis object Signal Scaling is represented by the SignalScalingAnalysis object.

With the Time-Frequency Spectrum analysis, the frequency can now be replaced by the current speed. The TimeFreqSpectralAnalysis object has been expanded to include the properties SpeedComposed, SpeedDataSet and SpeedXDataSet.

Changes and Enhancements to Presentation Objects

All cursor objects (diagram, document and worksheet) have been expanded to include the properties NumberOfHarmonicCursors and HarmonicCursorSpacing and the methods ZoomHorizontally and ZoomVertically. The additional property CustomCoordinates features the new CustomCoordinates collection, which holds objects from the new CustomCoordinate type.  The properties MarkerText, MarkerFont, MarkerFrameColor, MarkerLineColor, MarkerBackgroundColor, MarkerPosition and MarkerType were removed and moved to the Markers collection. Thus, for instance, ".MarkerFont" needs to be converted to ".Markers.Font" in the VBA code. The same applies to the other properties.

The cursor objects can now send the additional events BeforeZoomVertically, QueryCancelZoomVertically, ZoomVerticallyCanceled, VerticallyZoomed, BeforeZoomHorizontally, QueryCancelZoomHorizontally, ZoomHorizontallyCanceled, HorizontallyZoomed, BeforeCurveTranslate, QueryCancelCurveTranslate, CurveTranslateCanceled and CurveTranslated.

In the FpCursor and Marker objects, the Bounded property was renamed to Bound. Thus, for instance, ".Bounded" needs to be replaced with ".Bound" in the VBA code. The properties HarmonicsPositionIndex, HarmonicsPositionX and HarmonicsPositionY and the methods InterpolateValue and InterpolateRangeBetweenCursors were added, and the methods PlaceMarker and PlaceRangeMarker have been expanded to include an optional element that distinguishes between local and global markers. The Marker object has been expanded accordingly to include the ShowInAllViews property. The method TranslateCurve was added to the FpCursor object.

The Axis2D object now also includes the properties AssignedAxis, SizePercentage as well as the Arrow property, which returns the new AxisArrow object. The Subdivisions property now no longer provides an AxisSubdivisions object, but instead provides an AxisDivisions object, which no longer contains the Count property. This property has been added to the objects Axis2DScaling and Axis3DScaling as NumberOfSubDivsions. Thus, the ".Subdivisions.Count" needs to be changed to ".Scaling.NumberOfSubdivisions" in the VBA code.

The Axis3D and ColorLegend3D objects now also include the Arrow property. As for the Subdivisions property, the same applies as for the Axis2D object.

The Position property of the ColorLegend3D object now uses the new enumeration type FpColorLegendPosition. "ColorLegend.Position = fpPosition" needs to be changed in the VBA code to "ColorLegend.Position = fpColorLegendPosition". The Border property now no longer provides an object of the LegendBorder type, but instead directly provide an object of the LineFormat typeThus, "ColorLegend.Border.Visible = False" should be replaced with "ColorLegend.Border.Color = fpColorTransparent" or "ColorLegend.Border.LineFormat.Color" with "ColorLegend.Border.Color" in the VBA code.

The Axis2DLabels object and the Axis3DLabels object now include the properties LabelUnit, UnitPosition and TransformAllLabels.

The ColorLegend3DLabels object now includes the LabelUnit and UnitPosition properties.

The mechanism for axis labeling has been changed fundamentally in FlexPro 8. In the Axis2DText, Axis3DText and ColorLegend3DText objects, the Combine property was replaced by the UseTextsFromCurves property. The semantics, however, is different from that of Combine. While Combine used the text stored in the Axis2DText object as a template for all curves, UseTextsFromCurves takes the texts from the new AxisLabel objects of the curves. If your VBA code contains statements such as ".YAxis(1).Text.Text =", you will need to replace them with ".Curves(i).YAxisLabel.Text = " if UseTextsFromCurves isTrue. You may also need to modify the text itself if it contains these fields. The MultiColor property in Axis2DText and Axis3DText was renamed to ColorAutomatic. Thus, ".Text.MultiColor" needs to be replaced with ".Text.ColorAutomatic"  in the VBA code. The objects Axis2DText, Axis3DText and ColorLegend3DText have also been expanded to include the properties HorizontalOffset and VerticalOffset.

Curves can now be labeled and contain the texts used to label all axes. Curves can also be excluded from being displayed and from cursoring. The Curve2D object  now also includes the CurveLabel property, which features the new CurveLabel object, and the properties Visible, AutoScale, Cursors, YAxis, XAxis, YAxisLabel and XAxisLabel. The properties YCursorFormat and XCursorFormat were removed from the Curve2DData object and moved to the Curve2D object. Thus, for instance, ".Data.YCursorFormat" needs to be changed to ".YCursorFormat" in the VBA code. The Curve3D object now includes the following properties:Visible, AutoScale, Cursors, CurveLabel, YAxisLabel, XAxisLabel, ZAxisLabel and ColorLegendLabel. The properties YCursorFormat, XCursorFormat and ZCursorFormat were removed from the Curve3DDataSets object and moved to the Curve3D object. Thus, for instance, ".Datasets.YCursorFormat" needs to be changed to ".YCursorFormat" in the VBA code.

You can now select the algorithm for the space curve conversion of 3D surfaces. The Curve3DDataSets collection has therefore been expanded to include the ConversionAlgorithm property. The properties Composed, DataSet and XDataSet were added so that the first entry in the collection also appears in the Properties window. Correspondingly, the properties YValueObject, YComponent, XValueObject and XComponent were added.

Curves in 2D diagrams can now be translated. The Curve2DData object thus now also includes the YOffset and XOffset properties.

The objects Curve2DSymbols, Curve3DSymbols and Curve2DIndicators and the new object CurveLabels now include the Offset property, which sets the first data point to be displayed.

Choosing data labels for curves is now no longer done using a fixed type, but rather using text in which placeholders can be inserted for the individual elements of the data point. The two objects Curv2DLabels and Curve3DLabels were replaced by the new CurveLabels object, which features the added Offset and BackgroundColor properties and instead of the Text and Format properties uses the Text property. The text contains fields for the data to be labeled. Thus, for instance, ".Labels.Format = "%.4g" and ".Labels.Type = fpLabelTypeY" or ".Labels.Type = fp3DLabelTypeY" have to be replaced with ".Labels.Text = "%.4g<YValue>".

The Legend object has been expanded to include the LinyByLine property. The properties Border and Interior of the Legend object now no longer provide objects of the LegendBorder or LegendInterior type, but instead directly provide an object of the type LineFormat or FillFormat. Thus, "Legend.Interior.Visible = False" should be replaced with "Legend.Interior.Color = fpColorTransparent" or "Legend.Interior.FillFormat.Color" with "Legend.Interior.Color" in the VBA code. For Border the "Legend.Border.Visible = False" should be replaced with "Legend.Border.Color = fpColorTransparent" or "Legend.Border.LineFormat.Color" with "Legend.Border.Color". In addition, the Legend object includes the properties Title and TitleFont in the new LegendTitle object. Thus, "Legend.Title" should be replaced with "Legend.Title.Title", "Legend.TitleFont" with "Legend.Title.Font" and "Legend.TitlePosition" with "Legend.Title.Position" in the VBA code.

The LegendEntry object has been expanded to include the Select method.

The size of worksheet panes can now be adjusted and the panes can be split. The WorksheetPane object has been expanded to include the properties Width and Height and the methods SplitVertically and SplitHorizontally.

Images can now be added to drawings. The size of the images can also be scaled according to the size of the original. The Shapes collection has therefore been expanded to include the AddImage method, and the Shape object has been expanded to include the HorizontalScale and VerticalScale properties.

You can now also adjust the size of tables to the content. The ColumnTable object and the CellTable object have thus been expanded to include the AdjustSizeToContent method.

Positioning of table title has been improved. The Position property of the objects ColumnTableTitle and CellTableTitle now uses the new enumeration type FpTitlePosition. In the "Title.Position = fpPosition" needs to be replaced with "Title.Position = fpTitlePosition" in the VBA code.

The Selection  property of the Worksheet object now features a WorksheetSelection object, which, compared to the FPObjects object used in FlexPro 7, has been expanded to include the SelectPane and Paste methods.

Changes and Enhancements to Enumerations

Additional elements have been added to the following enumeration types: FpTextDataLinkDataType, FpBinaryDataLinkDataType, FpBinaryDataLinkResultDataType, FpDataType, FpShapeType, FpObjectType, FpTaskWindow, FpCoordinatesDisplayMode, FpCursorScaleAxisMode, FpLegendPosition, FpPenStyle, FpArrowheads, FpSymbolType, Fp3DSymbolType, FpColumnType, FpFillingType, FpEventIsolationEvent, FpEventIsolationResult, FpFourierSpectralProcedure, FpTimeFreqSpectralProcedure, FpTimeFreqAnalysisResult, FpFourierSpectrumType.

The FpMoveCursor enumeration type now includes the renamed elements fpMoveCursorNextValue, fpMoveCursorPreviousValue, fpMoveCursor10ValuesForward, fpMoveCursor10ValuesBack, fpMoveCursor10StepsUp, fpMoveCursor10StepsDown, fpMoveCursorSectionForward, fpMoveCursorSectionBack, fpMoveCursorSectionUp, fpMoveCursorSectionDown, fpMoveCursorNextCurve, fpMoveCursorPreviousCurve, fpMoveCursorBothNextCurve and fpMoveCursorBothPreviousCurve as well as other elements. The previous names are still supported, but should be replaced in your VBA code.

In the FpAxisScalingMode enumeration type, the element fpAxisScalingModeAutomatic has been replaced by the elements fpAxisScalingModeMinMax and fpAxisScalingModeDataRange. The meaning of fpAxisScalingModeMinMax  is the same as that of fpAxisScalingModeAutomatic. Information on how to adjust the VBA code is available above.

The Rainflow matrix of the Counting Procedures option can now be calculated in three variants. In the FpRainflowCountMatrix enumeration type, the element fpRainflowCountRainflowMatrix was renamed to fpRainflowCountRainflowMatrixFromTo and two additional elements were added. The previous description is still supported, but should be replaced in your VBA code.

The following enumeration types were added: FpBracketType, FpColorLegendPosition, FpTitlePosition, FpArrowPosition, FpUnitPosition, FpConversionAlgorithm, FpLoudnessResult, FpLoudnessAlgorithm, FpLoudnessSoundField, FpLoudnessCalibrationMode, FpNASACDFFormat, FpNASACDFCompression, FpNASACDFEncoding, FpCOMTRADEFormat, FpCOMTRADEVersion, FpHumanBodyVibrationDirection, FpHumanBodyVibrationProcedure, FpHumanBodyVibrationFrequencyWeighting, FpHumanBodyVibrationOutput, FpHandVibrationOutput, FpRenamingOptions, FpRainflowCountResidue and FpSignalScalingMode.

The enumeration types FpLabelType and Fp3DLabelType were removed. Information on how to adjust the VBA code is available above.

Other Changes and Enhancements

The objects ExportSettingsNASACDF and ExportSettingsCOMTRADE were added. The ExportSettings object was expanded accordingly to include the properties NASACDF and COMTRADE.

The Global object was expanded to include the AsyncUpdate property.

The Application object was expanded to include the properties AsyncUpdate and COMMAddIns and the ForceUpdate, and the DefragmentDatabase method. The Update and UpdateAll methods were expanded to include an optional Async argument that can be used to run an update in the background under FlexPro Professional.

The Database object was expanded to include the properties SaveFormulaResults, SaveCalculatedPictures, FPScriptAutoDim, AutoUpdate and MaxDigits as well as the ResetWindowArrangement method. The Consolidate method, which was used to defragment a database, has been removed, since in FlexPro 8 it is no longer possible to defragment a database while it is open. Instead, you will need to use the DefragmentDatabase method of the Application object in VBA code.

The FpObjectParameter object was expanded to include the Application and Parent properties.

All FPObject objects have thus been expanded to include the Rename method, which allows you to control to what extent references to the object to be renamed should be corrected. In addition, the FPScriptReference property has been added, which returns the name and, if applicable, the path of the object in the database in FPScript reference format.

For an embedded FPScript formula the ParentFolder property now returns the folder containing the data object that the formula refers to. You can restore the previous behavior in this case by using the Parent property.

In all FPObject objects, the ReadOnly property can now be set as well. The Locked and Updating properties as well as the ForceUpdate method were added. The ForceUpdate method is also available in the FpObjects and DocObjectSelection collections. The Update method has been expanded to include an optional Async argument that can be used to run an update in the background under FlexPro Professional.

The DatabaseSelection collection has therefore been expanded to include the methods ConvertToFormula, Evaluate and Merge.

FlexProFlexPro 8 now supports data sets containing more than 2GB of data. 32-bit integers are no longer sufficient for indexing this amount of data. Unfortunately, Visual Basic does not support the 64-bit integer data type. Therefore, the 64-bit floating point data type was used in such cases. All properties and methods that use data indices have been converted accordingly. You will need to convert the appropriate variable in VBA code as long as you have not used the variant data type.

The Visible property of the Curve2DLine and of the Waterfall3DLine object is now set to False by default when a new diagram is created. You may therefore have to revise the VBA macro you recorded using FlexPro 7 and set the property to True.

See Also

What's New in FlexPro 7's Object Model

Share article or send as email:

You might be interested in these articles