Attributes Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Provides access to attributes associated with a specific entity, Product, or Document. Also supports the creation of new attributes.

Methods

Name Description
add Adds a new attribute to the parent entity. If an attribute already exists on the entity with the same groupName and name already exists, this will update the existing attribute with the new value.
classType Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item Returns the specified attribute using an index into the collection.
itemByName Returns the specified attribute using the name of the attribute.
itemsByGroup Returns an array of all of the attributes that belong to the specified group.

Properties

Name Description
count Returns the number of attributes in the collection.
groupNames Returns an array of strings that are all of the name of attribute groups that exist on this entity. An empty array can be returns if there are no attributes on the entity.
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

AccessibilityAnalysis.attributes, Analysis.attributes, AsBuiltJoint.attributes, BaseFeature.attributes, BossFeature.attributes, BoundaryFillFeature.attributes, BoxFeature.attributes, BRepBody.attributes, BRepEdge.attributes, BRepFace.attributes, BRepVertex.attributes, CAM.attributes, CAMAdditiveContainer.attributes, CAMFolder.attributes, CAMHoleRecognition.attributes, CAMPattern.attributes, ChamferFeature.attributes, CircularPatternConstraint.attributes, CircularPatternFeature.attributes, CoilFeature.attributes, CoincidentConstraint.attributes, CoincidentToSurfaceConstraint.attributes, CollinearConstraint.attributes, CombineFeature.attributes, Component.attributes, ConcentricConstraint.attributes, ConstructionAxis.attributes, ConstructionPlane.attributes, ConstructionPoint.attributes, CopyPasteBody.attributes, CurvatureCombAnalysis.attributes, CurvatureMapAnalysis.attributes, CustomFeature.attributes, CustomFeatureParameter.attributes, CutPasteBody.attributes, CylinderFeature.attributes, DeleteFaceFeature.attributes, Design.attributes, Document.attributes, DraftAnalysis.attributes, DraftFeature.attributes, Drawing.attributes, DrawingDocument.attributes, EqualConstraint.attributes, ExtendFeature.attributes, ExtrudeFeature.attributes, Feature.attributes, FilletFeature.attributes, FlangeFeature.attributes, FlatPattern.attributes, FlatPatternComponent.attributes, FlatPatternProduct.attributes, FormFeature.attributes, FusionDocument.attributes, GeometricConstraint.attributes, HoleFeature.attributes, HorizontalConstraint.attributes, HorizontalPointsConstraint.attributes, IsoCurveAnalysis.attributes, Joint.attributes, JointOrigin.attributes, LineOnPlanarSurfaceConstraint.attributes, LineParallelToPlanarSurfaceConstraint.attributes, LoftFeature.attributes, MeshBody.attributes, MeshFeature.attributes, MeshReduceFeature.attributes, MeshRemeshFeature.attributes, MeshRepairFeature.attributes, MeshShellFeature.attributes, MeshSmoothFeature.attributes, MidPointConstraint.attributes, MinimumRadiusAnalysis.attributes, MirrorFeature.attributes, ModelParameter.attributes, MoveFeature.attributes, NCProgram.attributes, Occurrence.attributes, OffsetConstraint.attributes, OffsetFacesFeature.attributes, OffsetFeature.attributes, Operation.attributes, OperationBase.attributes, ParallelConstraint.attributes, Parameter.attributes, PatchFeature.attributes, PathPatternFeature.attributes, PerpendicularConstraint.attributes, PerpendicularToSurfaceConstraint.attributes, PipeFeature.attributes, PolygonConstraint.attributes, Product.attributes, RectangularPatternConstraint.attributes, RectangularPatternFeature.attributes, RefoldFeature.attributes, RemoveFeature.attributes, ReplaceFaceFeature.attributes, ReverseNormalFeature.attributes, RevolveFeature.attributes, RibFeature.attributes, RigidGroup.attributes, RipFeature.attributes, RuledSurfaceFeature.attributes, RuleFilletFeature.attributes, ScaleFeature.attributes, SectionAnalysis.attributes, Setup.attributes, ShellFeature.attributes, SilhouetteSplitFeature.attributes, Sketch.attributes, SketchAngularDimension.attributes, SketchArc.attributes, SketchCircle.attributes, SketchConcentricCircleDimension.attributes, SketchConicCurve.attributes, SketchControlPointSpline.attributes, SketchCurve.attributes, SketchDiameterDimension.attributes, SketchDimension.attributes, SketchDistanceBetweenLineAndPlanarSurfaceDimension.attributes, SketchDistanceBetweenPointAndSurfaceDimension.attributes, SketchEllipse.attributes, SketchEllipseMajorRadiusDimension.attributes, SketchEllipseMinorRadiusDimension.attributes, SketchEllipticalArc.attributes, SketchEntity.attributes, SketchFittedSpline.attributes, SketchFixedSpline.attributes, SketchLine.attributes, SketchLinearDiameterDimension.attributes, SketchLinearDimension.attributes, SketchOffsetCurvesDimension.attributes, SketchOffsetDimension.attributes, SketchPoint.attributes, SketchRadialDimension.attributes, SketchTangentDistanceDimension.attributes, SketchText.attributes, SmoothConstraint.attributes, SphereFeature.attributes, SplitBodyFeature.attributes, SplitFaceFeature.attributes, StitchFeature.attributes, SurfaceDeleteFaceFeature.attributes, SweepFeature.attributes, SymmetryConstraint.attributes, TangentConstraint.attributes, TangentRelationship.attributes, ThickenFeature.attributes, ThreadFeature.attributes, TorusFeature.attributes, TrimFeature.attributes, UnfoldFeature.attributes, UnstitchFeature.attributes, UntrimFeature.attributes, UserParameter.attributes, VerticalConstraint.attributes, VerticalPointsConstraint.attributes, WebFeature.attributes, WorkingModel.attributes, ZebraAnalysis.attributes

Version

Introduced in version May 2016