Share

ComponentDefinition Object


Description

The ComponentDefinition object is the base class for the PartComponentDefinition, AssemblyComponentDefinition and the FlatPattern objects.

Methods

Name Description
FindUsingPoint Method that finds all the entities of the specified type at the specified location.
FindUsingVector Method that finds all the entities of the specified type along the specified vector using either a cylinder or cone that to define the tolerance within the defined vector.
GetUnusedGeometries Method that gets the unused sketches and work features.
PurgeUnusedGeometries Method that purges unused sketches and work features.
RepositionObject Method that repositions the specifies object(s) to the new position within the collection of the object in the document.

Properties

Name Description
Application Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned.
AttributeSets Property that returns the AttributeSets collection object associated with this object.
BOMQuantity Property that returns the BOMQuantity object.
BOMStructure Gets and sets how the component is used/viewed in a BOM.
ClientGraphicsCollection Property that returns the ClientGraphicsCollection object.
DataIO Gets the object that directly deals with I/O to and from a storage-medium, including Streams(IStream).
Document Property that returns the containing Document object.
ModelGeometryVersion Property that returns a string that can be used to determine if the document has been modified. This version string is changed every time the assembly is modified. By saving a previous version string, you can compare the current version string to see if the assembly has been modified.
Occurrences Property that returns the collection object.
OrientedMinimumRangeBox Read-only property that returns the oriented minimum range box for this object.
PreciseRangeBox Gets a bounding box that tightly encloses all the solid and surface bodies under the ComponentDefinition.
RangeBox Property that returns a Box object which contains the opposing points of a rectangular box that is guaranteed to enclose this object.
SurfaceBodies Property that returns all of the result SurfaceBody objects contained within this ComponentDefinition.
Type Returns an ObjectTypeEnum indicating this object's type.

Accessed From

AliasFreeformFeature.Parent, AliasFreeformFeatureProxy.Parent, AnalysisManager.Parent, AngularModelDimension.Parent, AngularModelDimensionProxy.Parent, AnnotationPlane.Parent, AnnotationPlaneProxy.Parent, ApprenticeServerDocument.ComponentDefinition, ApprenticeServerDrawingDocument.ComponentDefinition, BendFeature.Parent, BendFeatureProxy.Parent, BendPartFeature.Parent, BendPartFeatureProxy.Parent, BIMComponent.ComponentDefinition, BOMQuantity.Parent, BossFeature.Parent, BossFeatureProxy.Parent, BoundaryPatchFeature.Parent, BoundaryPatchFeatureProxy.Parent, ChamferFeature.Parent, ChamferFeatureProxy.Parent, CircularPatternFeature.Parent, CircularPatternFeatureProxy.Parent, ClientFeature.Parent, ClientFeatureProxy.Parent, CoilFeature.Parent, CoilFeatureProxy.Parent, CombineFeature.Parent, CombineFeatureProxy.Parent, ComponentDefinitionReference.ReferencedDefinition, ComponentDefinitions.Item, ComponentDefinitionsEnumerator.Item, ComponentOccurrence.ContextDefinition, ComponentOccurrence.Definition, ComponentOccurrenceProxy.ContextDefinition, ComponentOccurrenceProxy.Definition, ContourFlangeFeature.Parent, ContourFlangeFeatureProxy.Parent, ContourRollFeature.Parent, ContourRollFeatureProxy.Parent, CoreCavityFeature.Parent, CoreCavityFeatureProxy.Parent, CornerChamferFeature.Parent, CornerChamferFeatureProxy.Parent, CornerFeature.Parent, CornerFeatureProxy.Parent, CornerRoundFeature.Parent, CornerRoundFeatureProxy.Parent, CosmeticBendFeature.Parent, CosmeticBendFeatureProxy.Parent, CutFeature.Parent, CutFeatureProxy.Parent, DecalFeature.Parent, DecalFeatureProxy.Parent, DeleteFaceFeature.Parent, DeleteFaceFeatureProxy.Parent, DerivedAliasComponent.Parent, DerivedAliasComponentProxy.Parent, DerivedAliasComponents.Parent, DerivedAssemblyComponent.Parent, DerivedAssemblyComponentProxy.Parent, DerivedAssemblyComponents.Parent, DerivedFutureAssemblyComponent.Parent, DerivedFutureAssemblyComponentProxy.Parent, DerivedFutureAssemblyComponents.Parent, DerivedFuturePartComponent.Parent, DerivedFuturePartComponentProxy.Parent, DerivedFuturePartComponents.Parent, DerivedPartComponent.Parent, DerivedPartComponentProxy.Parent, DerivedPartComponents.Parent, DiameterModelDimension.Parent, DiameterModelDimensionProxy.Parent, DirectEditFeature.Parent, DirectEditFeatureProxy.Parent, DWGUnderlays.Parent, EmbossFeature.Parent, EmbossFeatureProxy.Parent, EndOfFeatures.Parent, ExtendFeature.Parent, ExtendFeatureProxy.Parent, ExtrudeFeature.Parent, ExtrudeFeatureProxy.Parent, FaceDraftFeature.Parent, FaceDraftFeatureProxy.Parent, FaceFeature.Parent, FaceFeatureProxy.Parent, FaceOffsetFeature.Parent, FaceOffsetFeatureProxy.Parent, FilletFeature.Parent, FilletFeatureProxy.Parent, FinishFeature.Parent, FinishFeatureProxy.Parent, FlangeFeature.Parent, FlangeFeatureProxy.Parent, FoldFeature.Parent, FoldFeatureProxy.Parent, FreeformFeature.Parent, FreeformFeatureProxy.Parent, GrillFeature.Parent, GrillFeatureProxy.Parent, HemFeature.Parent, HemFeatureProxy.Parent, HoleFeature.Parent, HoleFeatureProxy.Parent, iFeature.Parent, iFeatureComponent.Parent, iFeatureProxy.Parent, iFeatureTemplateDescriptor.Parent, ImportedComponent.Parent, ImportedComponentProxy.Parent, ImportedComponents.Parent, ImportedDataExchangeComponent.Parent, ImportedDataExchangeComponentProxy.Parent, ImportedDWGComponent.Parent, ImportedDWGComponentProxy.Parent, ImportedGenericComponent.Parent, ImportedGenericComponentProxy.Parent, ImportedRVTComponent.Parent, ImportedRVTComponentProxy.Parent, iPartMember.Parent, KnitFeature.Parent, KnitFeatureProxy.Parent, LinearModelDimension.Parent, LinearModelDimensionProxy.Parent, LipFeature.Parent, LipFeatureProxy.Parent, LoftedFlangeFeature.Parent, LoftedFlangeFeatureProxy.Parent, LoftFeature.Parent, LoftFeatureProxy.Parent, MarkFeature.Parent, MarkFeatureProxy.Parent, MeshFeatureSet.Parent, MeshFeatureSetProxy.Parent, MidSurfaceFeature.Parent, MidSurfaceFeatureProxy.Parent, MirrorFeature.Parent, MirrorFeatureProxy.Parent, ModelAnnotation.Parent, ModelCompositeAnnotation.Parent, ModelCompositeAnnotationProxy.Parent, ModelDatum.Parent, ModelDatumIdentifier.Parent, ModelDatumIdentifierProxy.Parent, ModelDatumProxy.Parent, ModelDatumReferenceFrame.Parent, ModelDatumReferenceFrameProxy.Parent, ModelDatumTarget.Parent, ModelDatumTargetProxy.Parent, ModelDimension.Parent, ModelFeatureControlFrame.Parent, ModelFeatureControlFrameProxy.Parent, ModelGeneralNote.Parent, ModelGeneralNoteProxy.Parent, ModelHoleThreadNote.Parent, ModelHoleThreadNoteProxy.Parent, ModelLeaderNote.Parent, ModelLeaderNoteProxy.Parent, ModelState.Parent, ModelStates.Parent, ModelSurfaceTextureSymbol.Parent, ModelSurfaceTextureSymbolProxy.Parent, ModelToleranceFeature.Parent, ModelToleranceFeatureProxy.Parent, ModelWeldingSymbol.Parent, ModelWeldingSymbolProxy.Parent, MoveFaceFeature.Parent, MoveFaceFeatureProxy.Parent, MoveFeature.Parent, MoveFeatureProxy.Parent, NonParametricBaseFeature.Parent, NonParametricBaseFeatureProxy.Parent, PartFeature.Parent, PointCloud.Parent, PointCloudProxy.Parent, PointClouds.Parent, PunchToolFeature.Parent, PunchToolFeatureProxy.Parent, RadiusModelDimension.Parent, RadiusModelDimensionProxy.Parent, RectangularPatternFeature.Parent, RectangularPatternFeatureProxy.Parent, ReferenceComponent.Parent, ReferenceFeature.Parent, ReferenceFeatureProxy.Parent, RefoldFeature.Parent, RefoldFeatureProxy.Parent, ReplaceFaceFeature.Parent, ReplaceFaceFeatureProxy.Parent, RepresentationsManager.Parent, RestFeature.Parent, RestFeatureProxy.Parent, RevolveFeature.Parent, RevolveFeatureProxy.Parent, RibFeature.Parent, RibFeatureProxy.Parent, RipFeature.Parent, RipFeatureProxy.Parent, RuledSurfaceFeature.Parent, RuledSurfaceFeatureProxy.Parent, RuleFilletFeature.Parent, RuleFilletFeatureProxy.Parent, SculptFeature.Parent, SculptFeatureProxy.Parent, ShellFeature.Parent, ShellFeatureProxy.Parent, ShrinkwrapComponent.Parent, ShrinkwrapComponentProxy.Parent, SimulationManager.Parent, SketchDrivenPatternFeature.Parent, SketchDrivenPatternFeatureProxy.Parent, SnapFitFeature.Parent, SnapFitFeatureProxy.Parent, SplitFeature.Parent, SplitFeatureProxy.Parent, SurfaceBody.ComponentDefinition, SurfaceBodyProxy.ComponentDefinition, SweepFeature.Parent, SweepFeatureProxy.Parent, ThickenFeature.Parent, ThickenFeatureProxy.Parent, ThreadFeature.Parent, ThreadFeatureProxy.Parent, TrimFeature.Parent, TrimFeatureProxy.Parent, UnfoldFeature.Parent, UnfoldFeatureProxy.Parent, UnwrapFeature.Parent, UnwrapFeatureProxy.Parent, UserCoordinateSystem.Parent, UserCoordinateSystemProxy.Parent, WorkAxes.Parent, WorkAxis.Parent, WorkAxisProxy.Parent, WorkPlane.Parent, WorkPlaneProxy.Parent, WorkPlanes.Parent, WorkPoint.Parent, WorkPointProxy.Parent, WorkPoints.Parent, WorkSurface.Parent, WorkSurfaceProxy.Parent, WorkSurfaces.Parent

Derived Classes

AssemblyComponentDefinition, FlatPattern, PartComponentDefinition, VirtualComponentDefinition, WeldsComponentDefinition

Samples

Name Description
Adding iAssembly occurrences This sample demonstrates adding iAssembly occurrences to an assembly.
Traverse an Assembly This sample shows how to recursively traverse an assembly and get the count of leaf node components and subassemblies.
Find component referenced by balloon This sample demonstrates how to find the component that a balloon references.
Using the BOM APIs This sample demonstrates the Bill of Materials API functionality in assemblies.
Client Graphics - Draw Range Box This sample demonstrates the use of client graphics to draw the range box of selected entities.
Translate - Sheet Metal to DXF The sample code below writes a sheet metal file out as DXF. DWG is also supported. Use either the FLAT PATTERN DWG or FLAT PATTERN DXF formats.There are several optional arguments that can be specified as part of the format string. E.g. 'FLAT PATTERN DXF?TangentLayer=Tangents&SimplifySplines=True'). Below are the names of these arguments and relevant default values. The output will use these values unless you override them as part of the input string.
ArgumentTypeDefault ValueNote
TangentLayerStringIV_TANGENT
OuterProfileLayerStringIV_OUTER_PROFILE
ArcCentersLayerStringIV_ARC_CENTERS
InteriorProfilesLayerStringIV_INTERIOR_PROFILES
BendLayerStringIV_BENDBendUpLayer + BendDownLayer (legacy support)
BendUpLayerStringIV_BEND
BendDownLayerStringIV_BEND_DOWN
ToolCenterLayerStringIV_TOOL_CENTERToolCenterUpLayer + ToolCenterDownLayer (legacy support)
ToolCenterUpLayerStringIV_TOOL_CENTER
ToolCenterDownLayerStringIV_TOOL_CENTER_DOWN
FeatureProfilesLayerStringIV_FEATURE_PROFILESFeatureProfilesUpLayer + FeatureProfilesDownLayer (legacy support)
FeatureProfilesUpLayerStringIV_FEATURE_PROFILES
FeatureProfilesDownLayerStringIV_FEATURE_PROFILES_DOWN
AltRepFrontLayerStringIV_ALTREP_FRONT
AltRepBackLayerStringIV_ALTREP_BACK
UnconsumedSketchesLayerStringIV_UNCONSUMED_SKETCHES
UnconsumedSketchConstructionLayerStringIV_UNCONSUMED_SKETCH_CONSTRUCTION
TangentRollLinesLayerStringIV_ROLL_TANGENT
RollLinesLayerStringIV_ROLL
***ColorString*** indicates name of layer from the argument column. RGB values separated by ;. Example: TangentLayerColor=255;0;0
***LineTypeLong*** indicates name of layer from the argument column. Long value from LineTypeEnum. Example: TangentLayerLineType=37644
***LineWeightDouble*** indicates name of layer from the argument column. Value in centimeters. Example: TangentLayerLineWeight=.1016
CustomizeFilenameString
AcadVersionString2018, 2013, 2010, 2007, 2004, 2000, or R12 (for DXF only)
SimplifySplinesBooleanTrueEnable spline replacement(by linear segments or arcs).
SplineToleranceDouble0.01Chord tolerance for spline replacement
AdvancedLegacyExportBooleanTrue
MergeProfilesIntoPolylineBooleanFalseBuild a polyline of the exterior profiles
RebaseGeometryBooleanFalseMove geometry to 1st quadrant
InvisibleLayersStringList of layer names to make invisible, separated by ;
TrimCenterlinesAtContourBooleanFalseTrim the centerlines at contour.
SimplifyAsTangentArcsBooleanFalseTrue: Replace splines by tangent arcs. False: Replace splines by line segments. The SimplifySplines should be specified to True otherwise this option is ignored.

Version

Introduced in version 4

Was this information helpful?