MaxA_UID_Functions |
This file contains constants and global variables used to create the UIDs and a number of helper functions to populate the dialogs. Some of these functions require you to implement callbacks otherwise your script will fail.
MaxA UID Functions
FUNCTION uid_Create( dwOptions AS INTEGER ) Creates the dialog. The dwOptions parameter is passed to PROPLIST.Create as the panes options. Please refer to the PROPLIST extension library documentation
SUB uid_AngleSection() Creates the Angle Section
SUB uid_GraphSection( nView AS INTEGER ) Creates the Graph Section. The current view is passed to the function. The view can be one of: NT_XY NT_GRAPH
SUB uid_OptionsSection( dwOptions AS INTEGER ) Creates the Options Section using the supplied bit mask. Currently these options are available: CONST cOpt_Relative = 0x00000001 CONST cOpt_Normalize = 0x00000002
SUB uid_OutputSection() Creates the Output section
SUB uid_SignalProcSection() Creates the Interpolation and Filter Section
SUB uid_AddFile() This will add file(s) using MaxA Environment variables
FUNCTION uid_DoModal() Starts the Dialog Modal Loop. This loop will continue until status is set to PL_OK or PL_Cancel or an error condition. The function will call OnInitializeUID before entering the loop. The OnValidateResult is then called for every loop. It will also call uid_EnableDialogButton that will call OnEnableDialogButtons once every loop.
SUB uid_LoadProfile( hMAO AS HANDLE ) Load the current profile from the MAO
SUB uid_UpdateProfile( hMAO AS HANDLE )
FUNCTION uid_GetAngleOptions() AS HANDLE Retrieves the current angle options and returns a handle to the angle options in the MaxMAL extension library
SUB uid_ClearSelected() Clears all selected points in the file and point list
Callback Functions that must exist
SUB OnUpdateProfile( hMAO AS HANDLE, strSection AS STRING ) Called from uid_UpdateProfile. Passes the handle to the options file and the section ot use.
SUB OnLoadProfile( hMAO AS HANDLE, strSection AS STRING ) Called from uid_LoadProfile. Passes the handle to the options file and the section ot use.
SUB OnInitializeUID() Called from uid_DoModal before the Modal Loop starts
SUB OnEnableDialogButtons() Called from uid_EnableDialogButtons. This function is being called repeatably from within the UIDs Modal Loop
FUNCTION OnValidateResult( nStatus AS INTEGER, nPane AS INTEGER ) AS INTEGER Called from within the UID Modal Loop after the return from PROPLIST.DoModal(). The function is called with the status from PROPLIST.DoModal and the PROPLIST Pane number that triggered the response. The OnValidateResult function must return one of these codes PL_OK Accept current option and start processing PL_Cancel Cancel the UID and abort analysis PL_Update Process the analysis and update graphs and tables but return to Modal Loop cGraphProperties Display the graph properties dialog cSWAP_ORDER Swap order of signal processing items
Dialog Properties Constants
CONST cSpecifyStartTime = "Specify Start Time" CONST cStartTime = "{>}Start Time (s) " CONST cSpecifyStopTime = "Specify Stop Time" CONST cStopTime = "{>}Stop Time (s) " DIM cPositionView AS STRING CONST cCalculateRelative = "Calculate Relative" CONST cRelativeMarker = "{>}to Point " CONST cNormalizeGraph = "Normalize Graph" CONST cNormalizeFrames = "{>}use Frames " CONST cGraphControl = "Graph Control" CONST cGraphProperties = "Graph Properties" CONST cTableControl = "Table Control" CONST cTableProperties = "Table Properties"
CONST cInterpolation = "Interpolation" CONST cMaximumGap = "{>}Maximum Gap" CONST cCutFrames = "{>}Cut Frames"
CONST cSwapOrder = "^ Swap Order v"
CONST cFilter = "Filter" CONST cFilterLength = "{>}Filter Length" CONST cLowCutoffFreq = "{>}Low Cutoff Frequency" CONST cHighCutoffFreq = "{>}High Cutoff Frequency"
CONST cDerivativeLength = "Derivative Length" CONST cCalcMagnitude = "Calculate the Magnitude |A|"
CONST cAngleType = "Select Type of Angle" CONST cAngleRange = "Angle Range" CONST cAngleUnits = "Angle Units" CONST cAngle2DPlanes = "Project 3D Angle into a 2D Plane" CONST cAngleProject2ndVector = "Project 2nd Vector into 2D Plane" CONST cAngle2DAxis = "Calculate 2D Angle vs 2D Axis" CONST cAngleUseOrigin = "Use Origin as Point B"
CONST cAllCategories = "*"
Global Properties
DIM g_bUseStart AS INTEGER DIM g_bUseStop AS INTEGER DIM g_rStartTime AS REAL DIM g_rStopTime AS REAL DIM g_rStep AS REAL DIM g_rMaxTime AS REAL
DIM g_nInterpol AS INTEGER DIM g_nMaxGap AS INTEGER DIM g_nCutFrames AS INTEGER DIM g_bFilter1st AS INTEGER DIM g_nFilter AS INTEGER DIM g_nFilterLen AS INTEGER DIM g_nLowCutOff AS INTEGER DIM g_nHighCutOff AS INTEGER
DIM g_bCalcRel AS INTEGER DIM g_strCalcRel AS STRING DIM g_bNormalize AS INTEGER DIM g_nNormFrames AS INTEGER DIM g_nView AS INTEGER DIM g_strPoints AS STRING DIM g_strAnalogs AS STRING DIM g_nGraph AS INTEGER DIM g_nGrid AS INTEGER DIM g_nWinPos AS INTEGER DIM g_nCatOpen AS INTEGER DIM g_nDataType AS INTEGER DIM g_nAnglePoints AS INTEGER DIM g_hAngleOpt AS HANDLE
DIM g_ImageFolder AS STRING |