Issue with Merge Points on DXF Import

Hi,

I am looking to import a DXF file and extruding the sketch post import to a cetain thickness.

The DXF import is done using the macro - http://help.solidworks.com/2013/English/api/sldworksapi/Import_DXF_File_into_Part_Sketch_Example_VB.htm.

However, once imported, extrude on the sketch fails because of open contours which are a result of non-overlapping end points between the sketch edges.

I was aware of this and hence depended on the "Merge Points Closer Than" check box which is provided in the DXF Import UI.

If I import the DXF through the UI with the option to merge points (closer than 0.001) and then extrude the part, it comes out fine. The same thing done using the macro does not work. Please advise.

Is there a way to apply the merge points setting while importing through the macro? The SetMergePoints() call does not result in the required merge.

The DXF is attached for reference.

Please advise.

Thanks,

Hersh

SolidworksApi macros