Functions
msscancrit.fdf File Reference
#include "mstypes.h"
#include "scanner.h"
#include <DgnPlatform\ScanCriteria.h>

Functions

ScanCriteriaP mdlScanCriteria_create (void)
 The mdlScanCriteria_create function is used to allocate memory for and create a scan control structure. More...
 
ScanCriteriaP mdlScanCriteria_clone (ScanCriteriaP pScanCriteria)
 The mdlScanCriteria_clone function is used to clone the specified scan criteria. More...
 
int mdlScanCriteria_free (ScanCriteriaP scP)
 The mdlScanCriteria_free function is used to dispose of a scan criteria structure and all of its related data after it has been used. More...
 
int mdlScanCriteria_scan (ScanCriteriaP scP, void *scanBuf, int *scanSize, UInt32 *endOfScanPos)
 The mdlScanCriteria_scan function is used to execute a scan operation according to the criteria set in the specified ScanCriteria structure. More...
 
DgnPlatform::ScanTestResult mdlScanCriteria_checkElement (ScanCriteriaP scP, ElementRefP elemRef, MSElementCP pElem, bool doRangeTest, bool doAttrTest)
 The mdlScanCriteria_checkElement function applies a scan criteria against a single element. More...
 
int mdlScanCriteria_setModel (ScanCriteriaP scP, DgnModelRefP modelRef)
 Sets the model on which the scan criteria will work. More...
 
DgnModelRefP mdlScanCriteria_getModel (ScanCriteriaP scP)
 Returns the model on which the scan criteria will work. More...
 
StatusInt mdlScanCriteria_setReferenceFile (ScanCriteriaP scP, DgnAttachmentP pRef)
 Alternative to mdlScanCriteria_setModel to set the scanned file directly from a reference file structure. More...
 
int mdlScanCriteria_setReturnType (ScanCriteriaP scP, int returnType, int oneElementOnly, int nestCells)
 
The mdlScanCriteria_setReturnType function is used to establish the type of

information that should be returned by the scan operation. More...

 
StatusInt mdlScanCriteria_setElmDscrCallback (ScanCriteriaP scP, PFScanElemDscrCallback callbackFunc, CallbackArgP callbackArg)
 Setup a per-descriptor callback function for scan results. More...
 
int mdlScanCriteria_scanAllModelsOfFile (ScanCriteriaP inScP, PFScanElemDscrCallback pCallbackFunc, CallbackArgP pCallbackArg, DgnPlatform::DgnModelSections modelSections, DgnFileP pDgnFileObj)
 Iterates through all models of a given file, scanning each in turn. More...
 
StatusInt mdlScanCriteria_setElemRefCallback (ScanCriteriaP scP, PFScanElemRefCallback callbackFunc, CallbackArgP callbackArg)
 Setup an ElementRefP callback function for scan results. More...
 
int mdlScanCriteria_setRangeTest (ScanCriteriaP scP, DgnPlatform::ScanRange *srP)
 
The mdlScanCriteria_setRangeTest function is used to set the range for the scan

operation. More...

 
int mdlScanCriteria_setAttributeTest (ScanCriteriaP scP, int entity, long occurrence, ExtendedAttrBuf *extAttrBuf)
 
The mdlScanCriteria_setAttributeTest function is used to enable or disable

various attribute tests. More...

 
int mdlScanCriteria_setPriorityTest (ScanCriteriaP scP, UInt32 minPriority, UInt32 maxPriority)
 
The mdlScanCriteria_setPriorityTest function is used to enable or disable

priority testing with min and max limits. More...

 
int mdlScanCriteria_setTimeTest (ScanCriteriaP scP, double minModTime, double maxModTime)
 
The mdlScanCriteria_setTimeTest function is used to enable or disable the

testing of modification time with minimum and maximum time limits. More...

 
int mdlScanCriteria_setElementTypeTest (ScanCriteriaP scP, UShort *typeMask, int maskSize)
 
The mdlScanCritiera_setElementTypeTest function is used to enable or disable

testing based on element type. More...

 
int mdlScanCriteria_getElementTypeMask (ScanCriteriaP scP, UShort *typeMask, int maskSize)
 
The mdlScanCriteria_getElementTypeMask function is used to retrieve the current

element type mask from the scan criteria. More...

 
int mdlScanCriteria_getElementTypeMaskSize (ScanCriteriaP scP, int *maskSize)
 Gets the size of the element type mask from the specified DgnPlatform::ScanCriteria. More...
 
int mdlScanCriteria_setDrawnElements (ScanCriteriaP scP)
 
The mdlScanCriteria_setDrawnElements function is used to limit the scan

operation to drawn elements, eliminating control elements from the scan process. More...

 
int mdlScanCriteria_setCellNameTest (ScanCriteriaP scP, WCharCP cellName)
 
The mdlScanCriteria_setCellNameTest function is used to establish the name of a

cell as the target for the scan operation. More...

 
int mdlScanCriteria_setLevelTest (ScanCriteriaP scP, BitMaskP levelBitMask, bool enableMultiLevelTest, bool freeWhenDone)
 
The mdlScanCriteria_setLevelTest function is used to set a level bit mask for the

scan operation. More...

 
BitMaskCP mdlScanCriteria_getLevelBitMask (ScanCriteriaCP scP)
 
The mdlScanCriteria_getLevelBitMask function is used to get the level bit mask

from the scan criteria. More...

 
int mdlScanCriteria_setConstLevelTest (ScanCriteriaP scP, BitMaskCP levelBitMask, bool enableMultiLevelTest)
 
The mdlScanCriteria_setConstLevelTest function is used to set a level bit mask

for the scan with a "const" bit mask. More...

 
int mdlScanCriteria_setPropertiesTest (ScanCriteriaP scP, int propertiesVal, int propertiesMask)
 
The mdlScanCriteria_setPropertiesTest function is used to enable or disable

testing by property value and mask. More...

 
int mdlScanCriteria_getProperties (ScanCriteriaP scP, int *propertiesValP, int *propertiesMaskP)
 
The mdlScanCriteria_getProperties function is used to get the properties value

and mask data from the specified scan criteria structure. More...

 
StatusInt mdlScanCriteria_setLockedTest (ScanCriteriaP scP, bool lockedTest, bool lockedValue)
 
The mdlScanCriteria_setLockedTest function is used to enable or disable testing

based on the locked status of the design file elements. More...

 
int mdlScanCriteria_setClassTest (ScanCriteriaP scP, int classMask)
 
The mdlScanCriteria_setClassTest function is used to enable or disable the

testing of element class. More...

 
int mdlScanCriteria_setClassTestFromView (ScanCriteriaP scP, int viewIndex)
 
The mdlScanCriteria_setClassTestFromView function is used to enable or disable

the test of element class derived from view flags. More...

 
int mdlScanCriteria_getClassMask (ScanCriteriaCP scP)
 The mdlScanCriteria_getClassMask function is used to get the current class mask. More...
 
int mdlScanCriteria_setGraphicGroupTest (ScanCriteriaP scP, UInt32 graphicGroup)
 
The mdlScanCriteria_setGraphicGroupTest function is used to enable or disable

scanning on graphic group. More...

 
int mdlScanCriteria_setStartFilePos (ScanCriteriaP scP, UInt32 startFilePos)
 
The mdlScanCriteria_setStartFilePos function is used to set the file position in

the design file to be scanned at which the scan operation will begin. More...

 
int mdlScanCriteria_setStopFilePos (ScanCriteriaP scP, UInt32 stopFilePos)
 
The mdlScanCriteria_setStopFilePos function is used to set the file position at

which the scan operation will stop. More...

 
int mdlScanCriteria_setSkewRangeTest (ScanCriteriaP scP, DgnPlatform::ScanRange *mainRangeP, DgnPlatform::ScanRange *skewRangeP, DPoint3dP skewVectorP)
 
The mdlScanCriteria_setSkewRangeTest function is used to set up a skew range

test for the scan operation. More...

 
int mdlScanCriteria_setExtendedRangeTest (ScanCriteriaP scP, DgnPlatform::ScanRange *srP, int rangeNum)
 
The mdlScanCriteria_setExtendedRangeTest function is used to enable or disable

one of the array of test ranges. More...

 
int mdlScanCriteria_getExtendedRangeTest (ScanCriteriaP scP, DgnPlatform::ScanRange *srP, int rangeNum)
 
The mdlScanCriteria_getExtendedRangeTest function is used to retrieve

one of the array of test ranges. More...

 
StatusInt mdlScanCriteria_setViewTest (ScanCriteriaP scanCriteriaP, int viewIndex, DgnModelRefP modelRef)
 
The mdlScanCriteria_setViewTest function is used to set the specified scan

criteria to scan for the levels, class file and model that are displayable for the specified file in the specified view based on the current display flags, displayed levels and view model. More...

 
StatusInt mdlScanCriteria_setViewTestWithTypeMask (ScanCriteriaP scanCriteriaP, int viewIndex, DgnModelRefP modelRef, UShort *typeMask, int maskSize, Int16 propmsk, Int16 propval, bool setLockedTest, Int16 noLocked)
 
Used to set the specified scan criteria to scan for the

levels, class file and model that are displayable for the specified file in the specified view based on the current display flags, displayed levels and view model. More...

 
StatusInt mdlScanCriteria_setViewRangeTest (ScanCriteriaP scanCriteriaP, int viewIndex, DgnModelRefP modelRef)
 The mdlScanCriteria_setViewRangeIndex function is used to set the scan criteria range test to contain the contents of the specified model within the given view. More...
 
StatusInt mdlScanCriteria_setViewNpcRangeTest (ScanCriteriaP scanCriteria, int viewIndex, DgnModelRefP modelRef, DRange3dCP npcRange)
 The mdlScanCriteria_setViewRangeIndex function is used to set the scan criteria range test to contain the contents of the specified model within the given view. More...
 
StatusInt mdlScanCriteria_setViewLevelTest (ScanCriteriaP scanCriteriaP, int viewIndex, DgnModelRefP modelRef)
 Set the scan criteria level test to contain the contents of the given model within a given view. More...
 
ScanCriteriaP mdlScanCriteria_createFindNextCriteria (DgnModelRefP modelRef, UInt32 filePos)
 
The mdlScanCriteria_createFindNextCriteria function is used to create a

scanCriteria returning element data, set its file to the specified file at the specified file position. More...

 
ScanCriteriaP mdlScanCriteria_createAllGGCriteria (DgnModelRefP modelRef, int ggroup)
 
The mdlScanCriteria_createAllGGCriteria function is used to create a

scanCriteria returning file position and data of the elements in the specified graphic group within the specified model. More...

 
StatusInt mdlScanCriteria_setLocateTest (ScanCriteriaP scanCriteriaP, bool setLockedTest)
 
The mdlScanCriteria_setLocateTest function is used to set the scan criteria to

scan for the types and properties that are enabled in the current locate table. More...

 
void mdlScanCriteria_setDisplaySetTest (ScanCriteriaP scanCriteriaP, bool enable)
 Description Turns on or off the test of whether a particular element is in the display set. More...
 
void mdlScanCriteria_setIncludedTest (ScanCriteriaP scanCriteriaP, bool enable)
 Turns on or off the test of whether a particular elements in included in the display for a reference. More...
 
int mdlScanCriteria_addSingleElementTypeTest (ScanCriteriaP scP, int type)
 
The mdlScanCriteria_addSingleElementTestType function is used to set the scan

to return elements of the type specified. More...

 
int mdlScanCriteria_removeSingleElementTypeTest (ScanCriteriaP scP, int typeTest)
 
The mdlScanCriteria_removeSingleElementTypeTest function is used to remove

the given element type from the mask of those returned by the scan. More...

 
int mdlScanCriteria_addSingleLevelTest (ScanCriteriaP scP, int level)
 
The mdlScanCriteria_addSingleLevelTest is used to set the scan

to return elements from the specified level. More...

 
bool mdlScanCriteria_isLevelActive (ScanCriteriaP scP, int level)
 
The mdlScanCriteria_isLevelActive function is used to determine whether the

specified level is active in the specified scan. More...

 
bool mdlScanCriteria_isClassActive (ScanCriteriaP scP, int dgnClass)
 
The mdlScanCriteria_isClassActive function is used to determine whether the

specified element class is active in the specified scan. More...

 
void mdlScanCriteria_setNestOverride (ScanCriteriaP scP, short *mask, bool operation)
 
The mdlScanCriteria_setNestOverride function is used to set or clear the scan

criteria to override nesting to return all components if override is true for type. More...

 
void mdlScanCriteria_disableBsplineComponents (ScanCriteriaP scP)
 
The mdlScanCriteria_disableBsplineComponents function is used to restrict the

specified scanCriteria so that it will not return Bspline curve or surface component elements. More...

 
void mdlScanCriteria_setModelSections (ScanCriteriaP scP, DgnPlatform::DgnModelSections modelSections)
 
The mdlScanCriteria_setModelSections function is used to set the model sections

or sections that are the target of the scan operation specified by the scan criteria. More...

 
void mdlScanCriteria_setFilterFunction (ScanCriteriaP scP, PFScanFilterFunction filterFunc, CallbackArgP filterArg, PFFilterArgFreeFunction argFreeFunc)
 
UInt32 mdlScanCriteria_getCurrentFilePos (ScanCriteriaP scP)
 
The mdlScanCriteria_getCurrentFilePos function is used to get the current file

position of the scan operation. More...

 

Function Documentation

DgnPlatform::ScanTestResult mdlScanCriteria_checkElement ( ScanCriteriaP  scP,
ElementRefP  elemRef,
MSElementCP  pElem,
bool  doRangeTest,
bool  doAttrTest 
)

The mdlScanCriteria_checkElement function applies a scan criteria against a single element.

Parameters
[in,out]scPPoints to the ScanCriteria and context.
[in]elemRefContains the element to check. If this is NULL, then pElem will be used.
[in]pElemIf elemRef is NULL, then this element is tested.
[in]doRangeTestIndicates whether the element range is tested.
[in]doAttrTestIndicates whether the element attributes are tested.
Returns
false if the element is OK, true if it is rejected " "
Remarks
Required Library: mdlbltin.lib
ScanCriteriaP mdlScanCriteria_clone ( ScanCriteriaP  pScanCriteria)

The mdlScanCriteria_clone function is used to clone the specified scan criteria.

The caller is responsible for freeing the scan criteria after use by calling mdlScanCriteria_free.

Parameters
[out]pScanCriteriaIs a pointer to the scanCriteria structure to be copied.
Returns
A pointer to a copy of the specified scan criteria with its context cleared.
See also
usmthmdlScanCriteria_createC " "
Remarks
Required Library: mdlbltin.lib
ScanCriteriaP mdlScanCriteria_create ( void  )

The mdlScanCriteria_create function is used to allocate memory for and create a scan control structure.

The caller is responsible for freeing the scan criteria after use by calling mdlScanCriteria_free. The scan criteria is initialized to scan the active model and return the file positions of all elements.

Returns
A pointer to the scan criteria structure.
See also
usmthmdlScanCriteria_freeC " "
Remarks
Required Library: mdlbltin.lib
int mdlScanCriteria_free ( ScanCriteriaP  scP)

The mdlScanCriteria_free function is used to dispose of a scan criteria structure and all of its related data after it has been used.

Parameters
[in]scPIs the scan criteria which is to be disposed of.
Returns
SUCCESS
See also
usmthmdlScanCriteria_createC " "
Remarks
Required Library: mdlbltin.lib
int mdlScanCriteria_scan ( ScanCriteriaP  scP,
void *  scanBuf,
int *  scanSize,
UInt32 endOfScanPos 
)

The mdlScanCriteria_scan function is used to execute a scan operation according to the criteria set in the specified ScanCriteria structure.

Parameters
[in,out]scPIs the structure containing the criteria information for the scan operation.
[out]scanBufIs the buffer in which the scan results will be placed. NULL can be passed if the return type is set to MSSCANCRIT_ITERATE_ELMDSCR or MSSCANCRIT_ITERATE_ELMREF.
[in,out]scanSizeIs the size of the output buffer (in two-byte words) and, on completion, the number of words written to the scanBuf buffer. NULL can be passed if the return type is set to MSSCANCRIT_ITERATE_ELMDSCR or MSSCANCRIT_ITERATE_ELMREF.
[out]endOfScanPosIs the file position where the scanning operation stopped. NULL can be passed if this information is not needed.
Returns
one of the following values from scanner.h: END_OF_DGN if the scan completed to the end of the file. BUFF_FULL if the scanBuf filled before the end of the file. READ_LIMIT if the scan finishes the categories requested without hitting the end of the file or hits the stop file position. BAD_FILE if the scan criteria does not have a valid model. BAD_ELEMENT if the scan encounters a bad element in the file. BAD_REQUEST if not iterating and scanSize is invalid. BUFF_TOO_SMALL if not iterating and the scanBuf is too small to hold an element that should be returned. " "
Remarks
Required Library: mdlbltin.lib

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.