Share

IManagedComponents.AddCustomContentCenterPart Method

Adds a custom Content Center part to an assembly, or edits an existing part. The part is specified by a family path, family name, list of standard column names and values, and a list of custom names and values.

Namespace:  Autodesk.iLogic.Interfaces
Assembly:  Autodesk.iLogic.Interfaces (in Autodesk.iLogic.Interfaces.dll) Version: 30.0

Syntax

VB

Function AddCustomContentCenterPart ( 
	occName As String,
	ccPath As String,
	familyName As String,
	findRow As Object(),
	customValues As Object(),
	Optional asCustom As Boolean = true,
	Optional partFolder As String = Nothing,
	Optional partFilename As String = Nothing,
	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 AddCustomContentCenterPart(
	string occName,
	string ccPath,
	string familyName,
	Object[] findRow,
	Object[] customValues,
	bool asCustom = true,
	string partFolder = null,
	string partFilename = null,
	PointOrMatrix position = null,
	Nullable<bool> grounded = null,
	Nullable<bool> visible = null,
	StringOrAsset appearance = null
)

Parameters

occName
Type: System.String
Component occurrence name.
ccPath
Type: System.String
Category path in the Content Center tree view.
familyName
Type: System.String
Content center family name.
findRow
Type:  System.Object[]
Array of name, value pairs to select a row in the table. The names are column names (without units). The values can be strings or numbers. (e.g. {"Nominal Length", 45, "SIZE_SEL", "M6"})

The column names can be either display or internal names. Sometimes there are two or more columns with the same display name. In that case, use the internal name. (You can see the internal name in the table by hovering over the column header.)

customValues
Type:  System.Object[]
Array of name, value pairs for custom values. The names are column names (without units). The values can be strings or numbers. (e.g. {"Length", 200})

The column names must be internal names. (You can see the internal name in the table by hovering over the column header.)

asCustom (Optional)
Type: System.Boolean
Set this to False if you want the part to be placed as a Standard Content Center part. The default is True : the part will be placed as a custom part.
partFolder (Optional)
Type: System.String
The folder where the part should be created, or where it can be found if it has already been created. If this is not specified (or if it is an empty string), then the same folder as the assembly will be used. This argument must be empty (or not specified) if asCustom is false.
partFilename (Optional)
Type: System.String
The file name for the part. If this is not specified (or if it is an empty string), then the filename generated by Content Center will be used. If this is specified, it must have the extension .ipt. This should be a filename only, with no folder. The folder can be specified with the partFolder argument. This argument must be empty (or not specified) if asCustom is false.
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: ManagedComponentOccurrence
The component occurrence.

See Also

Reference

Was this information helpful?