Adds a component occurrence with a specific model state to an assembly, or modifies an existing component to match
the specified arguments.
Namespace: Autodesk.iLogic.Interfaces
Assembly: Autodesk.iLogic.Interfaces (in Autodesk.iLogic.Interfaces.dll) Version: 30.0
Syntax
VB
Function AddWithModelState ( occName As String, file As String, modelStateName As String, Optional position As PointOrMatrix = Nothing, Optional grounded As Nullable(Of Boolean) = Nothing, Optional visible As Nullable(Of Boolean) = Nothing, Optional appearance As StringOrAsset = Nothing ) As ManagedComponentOccurrence
C#
ManagedComponentOccurrence AddWithModelState( string occName, string file, string modelStateName, PointOrMatrix position = null, Nullable<bool> grounded = null, Nullable<bool> visible = null, StringOrAsset appearance = null )
Parameters
- occName
- Type: System.String
Component occurrence name. - file
- Type: System.String
The name of the part or assembly file to be added. This can be an absolute or relative path, or just a filename. - modelStateName
- Type: System.String
The name of the model state. - position (Optional)
- Type: Autodesk.iLogic.Types.PointOrMatrix
Position and orientation of the occurrence (specified as a DocumentUnitsPoint or DocumentUnitsMatrix). - grounded (Optional)
- Type: System.Nullable(Boolean)
Occurrence groundedness. Default is false. - visible (Optional)
- Type: System.Nullable(Boolean)
Occurrence visibility. Default is true. - appearance (Optional)
- Type: Autodesk.iLogic.Types.StringOrAsset
Occurrence appearance. Default is As Material.
Return Value
Type: ManagedComponentOccurrenceThe component occurrence.