This interface represents one of the document types in Cimatron (AssemblyDocument). It is used to to perform operations on AssemblyDocument.
interop.CimMdlrAPI
Cimatron 2024 or later
|
Get |
string |
|
|
Get |
interop.CimatronE.DocumentEnumType |
|
|
Get |
interop.CimatronE.DocumentEnumUnit |
|
|
Get |
int |
|
|
Get |
string |
|
|
Get |
string[] |
|
|
Get |
string |
|
|
Get |
interop.CimMdlrAPI.IModel |
|
void |
( int ) |
|
|
void |
( ) |
|
|
string |
( ) |
|
|
void |
( string ) |
|
|
void |
( string ) |
|
|
interop.CimatronE.IModel[] |
( ) |
|
|
void |
( interop.CimBaseAPI.Tool ) |
|
|
void |
( interop.CimBaseAPI.Tool ) |
|
|
int |
( ) |
|
|
void |
(interop.CimBaseAPI.Tool, interop.CimBaseAPI.IEntityFilter iEntFilter, interop.CimBaseAPI.IEntityFilter, int) |
|
|
interop.CimElectrodeAPI.IElectrodeServices |
( ) |
|
|
IUnknown |
( ) |
|
|
interop.CimDieAPI.IDieServices |
( ) |
|
|
IAssInstance |
( int ) |
|
|
interop.CimMoldAPI.IMoldServices |
( ) |
None
Use it to check what kind of file you have. In MS Visual C++, calling this interface with method QueryInterface (...) from a file returns NULL which means that this file isn't an assembly file. The same thing can be done in MS Visual Basic using the Set method. Assigning to a variable declared as IAssemblyDocument type with the Set method a variable of the ICimDocument type, returns an error if there is no assembly file.
//Sample Code in CSharp Cimatron AssemblyDocument object.
interop.CimAppAccess.AppAccess aAppAccess = new interop.CimAppAccess.AppAccess();
interop.CimatronE.IApplication CimApp = (interop.CimatronE.IApplication)aAppAccess.GetApplication();
interop.CimatronE.ICimDocument aDocument = (interop.CimatronE.ICimDocument)CimApp.GetActiveDoc();
if (aDocument != null)
{
if (aDocument.Type == interop.CimatronE.DocumentEnumType.cmAssembly)
{
interop.CimMdlrAPI.IAssemblyDocument aAssemblyDoc = (interop.CimMdlrAPI.IAssemblyDocument)aDocument;
//Do operations on aDocument.
}
}
import clr
#Adding references of required interop dlls
clr.AddReference("interop.CimAppAccess")
clr.AddReference("interop.CimatronE")
clr.AddReference("interop.CimServicesAPI")
clr.AddReference("interop.CimBaseAPI")
clr.AddReference("interop.CimMdlrAPI")
#importing modules from interop dlls
import interop.CimAppAccess
import interop.CimatronE
import interop.CimServicesAPI
import interop.CimBaseAPI
import interop.CimMdlrAPI
#Getting AppAccess Object
aCimAppAccess = interop.CimAppAccess.AppAccess()
#Getting instance of CimatronE Application
aCimApp = None
while (aCimApp == None) :
aCimApp = (interop.CimatronE.IApplication)(aCimAppAccess.GetApplication())
aDocument = (interop.CimatronE.ICimDocument)(aCimApp.GetActiveDoc())
if (aDocument != None) :
if (aDocument.Type == interop.CimatronE.DocumentEnumType.cmAssembly) :
aAssemblyDoc = (interop.CimMdlrAPI.IAssemblyDocument)(aDocument)
