Assembly Document <IvAssemblyDocument>

Synopsis

This design represents an ordinary Inventor assembly (.iam) document. All Intent models must have an instance of this design as the root component, and can have additional assemblies at lower levels. Assemblies can contain components such as: parts (using IvAdoptedPart), other assemblies (IvAssemblyDocument), constraints, occurrence patterns, drawing documents (typically only the top-level assembly), component groups (IvComponentGroup). Identical Assembly documents will be automatically shared, either within the active project or model. This behavior can be changed via the SharingBehavior and SharingScope parameter rules.

Mixins

IvCommonOccurrenceMixin

IvAssemblyChildMixin

IvBOMInfoMixin

BasePart

Parameters

Name Type Description
assemblyFileDirectory string Can be used to specify a directory where the assembly (.iam) file should be saved. Defaults to a subdirectory of the top-level assembly directory.
assemblyFileName string Can be used to specify the file name (including extension) of the assembly file (.iam) when it's saved. Defaults to a name representing the reference corresponding Intent part.
assemblyFileNamePrefix string Can be used to specify a special prefix to be used at the beginning of the assembly file name when it's saved. Defaults to "".
assemblyPathName string Represents the full path of the file to be used when saving the assembly. Defaults to a path constructed from the above individual components; can be provided to completely specify the save location.
AutoSaveChanges? boolean Controls whether IAM file is saved immediately after changes took place, default is False.
     
BOMBaseQuantity string (From IvBOMInfoMixin) Can be used to set the base quantity for the component. This is either the value "Each", or can be a legal units expression, for example, "1in". The default is "Each."
BOMBaseUnits string (From IvBOMInfoMixin) Can be used to set the true unit that the component is quantified in. It can be a measure of length, volume, or mass. This is only used when something other than "Each" is specified in BOMBaseQuantity. Must be a valid Inventor units string.
bomStructure name (From IvCommonOccurrenceMixin) Can be used to specify a value to be used for the BOM Structure for the Inventor assembly. The default value is :Default. Only :Default and :Reference are valid values.
     
cameraEnabled? boolean (From IvCameraMixin). Allows additional manipulation of the camera (see other camera* Parameters). Default is False.
cameraEye point (From IvCameraMixin). Specifies the position of the camera in the coordinate system of the document. Default is NoValue (use the current camera position)
cameraFit? boolean (From IvCameraMixin). If set, the view will be fit into containing window. Default is False.
cameraHeight number (From IvCameraMixin). Defines the view height extent in the project units. Default is NoValue -- use the current extent
cameraPerspective? boolean (From IvCameraMixin). Allows Perspective of Parallel view projection. Default is False (parallel projection)
cameraPerspectiveAngle number (From IvCameraMixin). In case of perspective projection, specifies the projection angle. Default is 0.0 degrees
cameraTarget point (From IvCameraMixin). Specifies the point in the coordinate system of the document the center of the camera is looking at. Default is NoValue (use the current camera target point)
cameraUpVector vector (From IvCameraMixin). Defines the camera rotation around it Z axis, which is aligned with the line defined by cameraEye/cameraTarget points. Default is NoValue (use the current camera rotation)
cameraUseTransitions? bool (From IvCameramixin). Defines whether the camera is set instantly or through animated transition path. Default is False -- camera settings are applied immediately
cameraViewOrientation Name (From IvCameraMixin). The possible values are:
  • :Front -- Front View orientation;
  • :Top -- Top view orientation;
  • :Right -- Right View orientation;
  • :Back -- Back View orientation;
  • :Left -- Left View orientation;
  • :IsoTopRight, :IsoTopLeft, :IsoBottomRight; :IsoBottomLeft - various ISO View orienations;
  • :Arbitrary - view orientation is not changed.

Default is :Arbitrary

cameraWidth number (From IvCameraMixin). Defines the view width extent in the project units. Default is NoValue -- use the current extent
DefaultBOMStructure name (From IvBOMInfoMixin) Can be used to specify how the component is used and viewed in the BOM. Available choices are: :Normal, :Inseparable, :Purchased, :Phantom, and :Reference. The default is :Normal.
grounded? boolean (From IvCommonOccurrenceMixin) Used to specify whether the sub-assembly component should be grounded within its containing assembly. Default is False. Typically set to True when ignorePosition? is set to False, and a position/orientation is provided via the origin parameter.
ignorePosition? boolean (From IvCommonOccurrenceMixin) Can be set to True to trigger the use of the positioning parameters (e.g., origin) to position the component within its containing assembly. Defaults to False .
iProperties list List of {name As string, value As any} pairs defining custom/standard properties. Note that custom properties cannot be safely removed, once set. To interpret string as date, use the inner list as (name, "yyyy-mm-dd [hh:mm:ss]", true )
occurrenceName string (From IvCommonOccurrenceMixin) Can be used to specify the occurrence name to use (in Inventor) for the assembly, when it's used as a sub-assembly. Defaults to a string representing the relative reference chain of the part from its containing assembly part.
origin frame (From BasePart) Can be used to position a sub-assembly occurrence within its containing assembly. This is ignored unless ignorePosition? is set to False
overrideOpacity number Number from 0 to 1 (0 is fully transparent), or NoValue (which is a default meaning 'no override'). The OverrideOpacity affected the assembly and its children
SharingBehavior name Controls whether the assembly can be re-used (:Standard), or will always be in a separate document (:Custom). This setting is ignored for the top-level assembly, which always behaves as if :Custom.
SharingScope name When SharingBehavior = :Standard, this controls whether the assembly will be shared for the entire project (:Project), or only for the current model (:Model). This parameter is ignored if SharingBehavior is set to :Custom.
templateFile string Can be used to specify the full path to an assembly (.iam) file to be used as the template when creating a new assembly document for this component. Default is "", which results in the use of the standard template (based on project units).
visible? boolean (From IvCommonOccurrenceMixin) Can be used to cause the Inventor component to be hidden within its containing assembly structure. Also affects the default design view. Default is False .

Rules

Name Type Description
PartNumber string Returns the Part Number as read from the document. The part number is set only on signature generation time of the document. It is not possible to have 2 member files that differ only by their Part Numbers . The existing assembly documents will not have their part numbers updated.

Methods

inventorParamValue( paramName As String, _
                    Optional Units as String = "databaseExceptLengthAndAngle" ) As Number 
Used to access (read) the value of a specified parameter from the assembly. The possible values for the units parameter are: "databaseExceptLengthAndAngle" - Default. Value returned in project units for length parameters, in degrees for angle parameters, and in Inventor database units for all other parameters. "database" - Value always returned in Inventor database units. Specific units - Value returned in specified units, which must be compatible with the parameter type.
inventorParamValueAsString( paramName As String, _
                            Optional units as String = "InventorParamUnits" ) As String
Used to access (read) the value of a specified parameter from the assembly. The value is returned as a string consisting of numeric value and units. The possible values for the units parameter are: "InventorParamUnits" - Default. String returned uses units associated with parameter in Inventor. "database" - String returned uses Inventor database units. Specific units - String returned uses specified units, which must be compatible with the parameter type.
GetNewPartNumber( docHandle As String ) As String 
Used to return the value of the Part Number. May be overridden in user code. docHandle is taken from the %%document rule. The default implementation returns the value from the {"Part number", "PN"} sublist in the iProperty rule. If no value exists, the file name (without extension) contained in $path is returned.
GetCamera( ) list 
Returns the camera settings in the format of string/value sublists
SetCamera() boolean 
Sets the camera parameters. The camera parameters are set only to the top level assembly document, on the first view. Use iv_setCamera function to apply camera to other documents
SaveImage( FileName As String, _
           width As Integer, _
           height As Integer, _
           Optional topColor As String = "default", _
           Optional bottomColor As String = "default") As Boolean
Saves the image of into specified file. The type of the image file (bmp, jpg, png, tiff, or gif) is implied based on the full file name. The width and height parameters specify the size of the image in pixels. Optional colors define the background gradient colors. If the topColor only is specified, no gradient is created. Camera parameters are taken from the Part.