In this tutorial you learn using C++ with MFC i.e. pure C++, how to:
Note:
The Close Selected button acts in a similar fashion as the activate button:
long i = lstFiles.GetCurSel();
oDoc = oDocs->Item(i+1);
oDoc->Close(TRUE);
lstFiles.DeleteString(lstFiles.GetCurSel());
The only difference or addition here is the item in the list for the file selected is removed from the list also. This way the documents in the list and in Solid Edge remain in sync.
Finally for the Close All button, a direct API is available:
oDocs->Close()
lstFiles.ResetContent()
The Close method of the documents collection oDocs which is not to be confused with the Close method of the document object oDoc closes all documents in Solid Edge. The Close method of the documents collection takes no argument.
Also note how the list is cleared since all documents in Solid Edge are now closed.
Summary: This covers most of the techniques related to documents in Solid Edge. Drop a comment below if you think any thing else related to Solid Edge documents needs to be covered.
Also, post a comment below if you need the Visual studio code files and be aware of cMayoCAD where you create your own, brand new, fully functional CAD system with scripting capabilities using a geometric modeling kernel.
Download the detailed course contents for cMayoCAD here.
No comments:
Post a Comment