InsertDwgOrDxfFile

I am trying to write a macro to import a dxf onto a surfaceand extrude it as a hole. The macro works except for the keyfunction; InsertDwgOrDxfFile. It just seems to fail silently whenrun in a macro. It seems to work fine when used manually. Hasanyone had any luck with a work around for this?SolidworksApi macros