I am inserting components w/ the API but would have oneproblem - I would like the user to be put in the same same mode aswhen they insert from Solidworks (not using API) - they get thecomponent "attached" to the mouse and can drag around(no buttonpushed) and when located then click the mouse and it will be put inthat location. If I do this and record the macro it gives meaddcomponent (which is obsolete now) call w/ final coordinates -simply the result of where it got placed. Is there any way I canhave the user put in this mouse "attached" mode and have themlocate the component for insertion? - Perhaps w/ sw_commands?Thanks in advance ... Scott
A little more info - Solidworks seems to be in FileDrop mode whichI am calling "attached" - You can can various FileDrop events - Ithink I would like to call it - Is that something I can do - callFileDrop ?
My Code:
m_objiSwApp.DocumentVisible(false, intDocType);
m_objiSwApp.OpenDocSilent(strComponentPath, intDocType, refintWarnings);
m_objiSwApp.DocumentVisible(true, intDocType);
m_dblInsertionIndex++;
SldWorks.Component2 objComponent;
objComponent = objAssemblyDoc.AddComponent4(strComponentPath, "",m_dblInsertionIndex, m_dblInsertionIndex, m_dblInsertionIndex);
SldWorks.ModelDoc2 swModel;
swModel = (SldWorks.ModelDoc2)m_objiSwApp.ActiveDoc;
SldWorks.IModelDocExtension objIModelDocExtension;
objIModelDocExtension = swModel.Extension;SolidworksApi macros
A little more info - Solidworks seems to be in FileDrop mode whichI am calling "attached" - You can can various FileDrop events - Ithink I would like to call it - Is that something I can do - callFileDrop ?
My Code:
m_objiSwApp.DocumentVisible(false, intDocType);
m_objiSwApp.OpenDocSilent(strComponentPath, intDocType, refintWarnings);
m_objiSwApp.DocumentVisible(true, intDocType);
m_dblInsertionIndex++;
SldWorks.Component2 objComponent;
objComponent = objAssemblyDoc.AddComponent4(strComponentPath, "",m_dblInsertionIndex, m_dblInsertionIndex, m_dblInsertionIndex);
SldWorks.ModelDoc2 swModel;
swModel = (SldWorks.ModelDoc2)m_objiSwApp.ActiveDoc;
SldWorks.IModelDocExtension objIModelDocExtension;
objIModelDocExtension = swModel.Extension;SolidworksApi macros
