Gets the name of the last-requested file to open and the options in effect while the file is opening or when the file finished opening.
.NET Syntax
Visual Basic (Declaration) | |
---|
Sub GetOpenedFileInfo( _
ByRef FileName As String, _
ByRef Options As Integer _
) |
Visual Basic (Usage) | |
---|
Dim instance As ISldWorks
Dim FileName As String
Dim Options As Integer
instance.GetOpenedFileInfo(FileName, Options)
|
C++/CLI | |
---|
void GetOpenedFileInfo(
& [Out] String^ FileName,
& [Out] int Options
) |
Parameters
- FileName
Name of the last-requested file to open
NOTE: The last-requested file to open can be in the process of opening or can be finished opening.
- Options
Options in effect when the last-requested file to open as defined in swOpenDocOptions_e
Example
STDMETHODIMP CRefNotFound::OnReferenceNotFoundNotify(BSTR strMissingReferenceFileName)
{
HRESULT hr = S_OK;
CComQIPtr<IModelDoc> pModel;
CComBSTR sActiveDocPathName;
CComBSTR sOpenedDocPathName;
long lOptions;
iSwApp->get_IActiveDoc(&pModel);
// pModel can be NULL when a document is opened by double-clicking in Windows Explorer.
if (pModel) {
hr = pModel->GetPathName(&sActiveDocPathName);
}
// sOpenedDocPathName is the name of the immediate parent
// document that refers to the missing document.
// sOpenedDocPathName may be different from sActiveDocPathName;
// for example when an assembly is opened through File, Open
// and the missing reference is a part in a sub-assembly.
// sOpenedDocPathName will contain the name of the sub-assembly;
// sActiveDocPathName will contain the name of the top-level
// assembly.
hr = iSwApp->GetOpenedFileInfo(&sOpenedDocPathName, &lOptions);
return hr;
}
Remarks
See Also
Availability
SolidWorks 2005 FCS, Revision Number 13.0