Assembly: VM.API.Pre.dll This class implements APIs for document.
Inheritance
object ← DocumentAPIExtension Methods
LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)Methods
CloseDocument(IDocument)
Close IDocument.Parameters
document IDocument
The document to be saved.
Exceptions
ArgumentNullException Will be thrown if ‘document’ argument is null.CreateNewPartDocument(string, string, Unit, double, LengthUnitType)
Create PartDocument.Parameters
newPartFilePath string
The file path of new part.
documentName string
The name of document.
unit Unit
The unit information.
iconSize double
The size of icon.
kernelLengthUnit LengthUnitType
The length unit of kernel.
Returns
PartDocument The new SubSystemDocument object that is created by this API.CreateNewSubsystemDocument(string, string, Vector, Unit, double, bool, Plane, bool, LengthUnitType)
Create SubSystemDocument.Parameters
newSubsystemFilePath string
The file path of new subsystem.
documentName string
The name of document.
gravity Vector
The gravity value.
unit Unit
The unit information.
iconSize double
The size of icon.
advancedMode bool
The flag whether using advanced mode.
symmetricPlane Plane
The symetric plane.
useSymmetric bool
The flag whether using symmetric.
kernelLengthUnit LengthUnitType
The length unit of kernel.
Returns
SubSystemDocument The new SubSystemDocument object that is created by this API.CreateNewSubsystemFromTemplateDocument(string, string)
Create SubSystemDocument.Parameters
newSubsystemFromTemplateFilePath string
The file path of new subsystem from template file path.
existedSubsystemTemplateFilePath string
The file path of existed subsystem template file path.
Returns
SubSystemDocument The new SubSystemDocument object that is created by this API.CreateNewTemplateDocument(string, string, Vector, Unit, double, bool, Plane, bool, LengthUnitType)
Create SubSystemDocument.Parameters
newSubsystemTemplateFilePath string
The file path of new subsystem template.
documentName string
The name of document.
gravity Vector
The gravity value.
unit Unit
The unit information.
iconSize double
The size of icon.
advancedMode bool
The flag whether using advanced mode.
symmetricPlane Plane
The symetric plane.
useSymmetric bool
The flag whether using symmetric.
kernelLengthUnit LengthUnitType
The length unit of kernel.
Returns
SubSystemDocument The new SubSystemDocument object that is created by this API.ModifyScenario(IDocument, Obj, bool)
Modify Scenario.Parameters
document IDocument
The document to modify the simulation scenario.
scenario Obj
The simulation scenario.
use bool
The use flag to modify the simulation scenario.
Exceptions
ArgumentNullException Will be thrown if ‘document’ argument is null. ArgumentException Will be thrown if the type of ‘scenario’ is not Scenario.SaveDocument(IDocument)
Save IDocument.Parameters
document IDocument
The document to be saved.
Exceptions
ArgumentNullException Will be thrown if ‘document’ argument is null.SaveDocument(IDocument, string)
Save IDocument.Parameters
document IDocument
The document to be saved.
filePath string
The document file path to be saved