CanvasApplication ObjectThe CanvasApplication object provides helper functions, information about 3D Canvas' current state and allows you to get the active Scene.
Gets the path of 3D Canvas. Syntax object.GetPath() as Variant
Gets the current 3D Canvas snap-to mode. Syntax object.GetSnapToMode() as Variant Remarks 0 = Never
Gets the object snap-to interval. Syntax object.GetSnapToObjectInterval() as Variant
Gets the point snap-to interval. Syntax object.GetSnapToPointInterval() as Variant
Gets the current mode of 3D Canvas. object.GetCanvasMode() as Variant Remarks 0 = Standard Modelling Mode
Gets the canvas mode's current time. This will always be 0 for Standard Modelling Mode. Syntax object.GetCanvasModeTime() as Variant
Gets the active scene. Syntax object.GetActiveScene() As CanvasScene
Gets details about 3D Canvas' grid. Syntax object.GetGridDetails(GridOriginX As Variant,
Gets the units that 3D Canvas is using. Syntax object.GetUnits() As Variant Remarks 0=Meters
Rotates a Point around a given axis. Syntax object.RotatePoint(PointX As Variant, Remarks Angle is in Radians. pi Radians = 180 Degrees.
Translates the provided number into a scientific notation string appropriate for an export function. Syntax object.FormatScientific(Number As Variant) As Variant Remarks This function ensures that an export function always formats numbers in a correct way regardless of the regional settings of the computer. 3D File formats are universally stored using the English numbering style where "one and one half" is represented as "1.50". Microsoft Windows however outputs numbers using the regional settings of the computer. This will not work for most export formats since they often delimit items with commas.
Translates the provided number into a string appropriate for an export function. Syntax object.FormatExport(Number As Variant) As Variant Remarks This function ensures that an export function always formats numbers in a correct way regardless of the regional settings of the computer. 3D File formats are universally stored using the English numbering style where "one and one half" is represented as "1.50". Microsoft Windows however outputs numbers using the regional settings of the computer. This will not work for most export formats since they often delimit items with commas.
Translates the provided number from 3D Canvas modeller units into meters and then into a string appropriate for an export function. Syntax object.FormatExportMeters(Number As Variant) As Variant Remarks This function ensures that an export function always formats numbers in a correct way regardless of the regional settings of the computer. 3D File formats are universally stored using the English numbering style where "one and one half" is represented as "1.50". Microsoft Windows however outputs numbers using the regional settings of the computer. This will not work for most export formats since they often delimit items with commas.
GetTexturePath Gets the full path for the supplied texture file name. Syntax object.GetTexturePath(TextureFileName As Variant) As Variant
Gets the path to the Microsoft Train Simulator "Utils" folder where modelling utilities are located. Syntax object.GetMSTrainSimulatorUtilsPath() As Variant
Exports the group, all child groups and child objects to a DirectX file. Syntax object.ExportToDirectX(ExportGroup as
Object,
Exports the group, all child groups and child objects to a Microsoft Train Simulator file. Syntax object.ExportToMSTrainSimulator(ExportGroup
as Object, Remarks DistanceLevels must be 1, 2 or 6. IgnoreObjects is a string that specifies the name group that should be excluded from export. This permits placeholder objects to be used within 3D Canvas that will not be exported to Microsoft Train Simulator. For example if IgnoreObjects is set to "MSTSPlaceholder", any object whose names begin with "MSTSPlaceholder" would not be exported. When set to 1 ConsolidateSubObjects results in 3D Canvas consolidated sub-objects on export. This is the most efficient export method. When set to 0 it results in 3D Canvas exporting sub-objects. Sub-objects are typically only required for signal creation.
Reserved for the use of Amabilis Software.
Exports the object to an MD2 file. Syntax object.ExportToMD2(ExportObject
as Object,
ExportToMSFlightSimulatorAircraft Exports the group, all child groups, and child objects to a Microsoft Flight Simulator Aircraft file. Syntax object.ExportToMSFlightSimulatorAircraft(ExportGroup
as Object,
ExportToMSFlightSimulatorScenery Exports the group, all child groups, and child objects to a Microsoft Flight Simulator Scenery file. Syntax object.ExportToMSFlightSimulatorScenery(ExportGroup
as Object,
Exports the group, all child groups, and child objects to a POVRay file. Syntax object.ExportToPOV(ExportGroup
as Object,
Exports the group, all child groups, and child objects to a RIB file. Syntax object.ExportToRIB(ExportGroup as
Object,
Exports the group, all child groups, and child objects to an W3D file. Syntax object.ExportToW3D(ExportGroup as
Object,
Imports a BioVision File. Syntax object.ImportFromBioVision(Filename as Variant)
Creates a custom CanvasGroup field. Syntax object.AddGroupCustomField(CustomFieldName As Variant) As Variant Remarks Returns the custom field value required to get/set the value of a custom field from an object using the GetCustomFieldValue/SetCustomFieldValue methods of the CanvasGroup object.
Gets the identifier associated with a custom CanvasGroup field name. Syntax object.GetGroupCustomFieldID(CustomFieldName As Variant) As Variant Remarks This provides the identifier required to get/set the value of a custom field from an object using the GetCustomFieldValue/SetCustomFieldValue methods of the CanvasGroup object. The custom field name may, or may not exist. If it does not exist -1 will be returned.
Creates a custom CanvasObject field. Syntax object.AddObjectCustomField(CustomFieldName As Variant) As Variant Remarks Returns the custom field value required to get/set the value of a custom field from an object using the GetCustomFieldValue/SetCustomFieldValue methods of the CanvasObject object.
Gets the identifier associated with a custom CanvasObject field name. Syntax object.GetObjectCustomFieldID(CustomFieldName As Variant) As Variant Remarks This provides the identifier required to get/set the value of a custom field from an object using the GetCustomFieldValue/SetCustomFieldValue methods of the CanvasObject object. The custom field name may, or may not exist. If it does not exist -1 will be returned.
Creates a custom CanvasMaterial field. Syntax object.AddMaterialCustomField(CustomFieldName As Variant) As Variant Remarks Returns the custom field value required to get/set the value of a custom field from an object using the GetCustomFieldValue/SetCustomFieldValue methods of the CanvasMaterial object.
Gets the identifier associated with a custom CanvasMaterial field name. Syntax object.GetMaterialCustomFieldID(CustomFieldName As Variant) As Variant Remarks This provides the identifier required to get/set the value of a custom field from an object using the GetCustomFieldValue/SetCustomFieldValue methods of the CanvasMaterial object. The custom field name may, or may not exist. If it does not exist -1 will be returned.
|