CountPartsInDXF
Name
CountPartsInDXF
When to use it
Any time.
Prototype
CountPartsInDXF(
FileName: BSTR/*[in]*/,
LoadedOk: long /*[out]*/
PartsCount: long /*[out]*/
);
Explanation
Count the number of components in a DXF file. This is useful to count the number of parts before loading the parts with LoadMultiplePartsFromDXF method.
Parameters
FileName - the name of the DXF file where shape is stored.
LoadedOk - specify if the shape was correctly loaded from file. The following values are returned (they can be combine by OR operator):
0 - ok.
2 - Could not open file or invalid file.
4 - Not supported shape.
8 - Curve not closed ! Please check your data or DXFLinkingDistance.
16 - Components of the dxf are overlapping!
32 - Invalid polyshape.
PartsCount - returns the number of distinct component found in the DXF file.
Warning !
Only the following entities are read from a DXF file: CIRCLE, ARC, LINE, POLYLINE and VERTEX. All other entities are ignored.
See also
NumberOfParts, DXFLinkingDistance, LoadMultiplePartsFromDXF.