基于您提供的 SolidWorks API 文档内容,以下是 IAnnotationIDisplayDimensionIDimension 这三个类的核心职责总结:

1. IAnnotation (注释接口)

核心职责:管理所有类型注释的通用外观、位置和依附关系。

IAnnotation 是 SolidWorks 中所有注释对象(包括尺寸、注释文本、公差框格、焊接符号等)的基类接口。它不关心具体的几何测量值,而是专注于注释在图形界面中的表现和布局。

  • 外观控制:管理颜色 (Color)、图层 (Layer)、可见性 (Visible)、线型/线宽 (Style, Width) 以及引线(Leader)的样式和长度。
  • 位置与布局:获取或设置注释的位置 (GetPosition, SetPosition2)、旋转矩阵 (GetPlane) 以及依附的实体 (GetAttachedEntities3, SetAttachedEntities)。
  • 文本格式:处理注释中的文本段落 (GetParagraphs) 和文本格式 (GetTextFormat, SetTextFormat)。
  • 通用操作:提供选择 (Select3)、拼写检查 (CheckSpelling)、获取所有者 (Owner) 以及判断是否悬空 (IsDangling) 等通用功能。
  • 特定类型识别:可以通过 GetTypeGetSpecificAnnotation 来判断或获取其背后的具体对象(如是否为尺寸、是否为 PMI 数据等)。

2. IDisplayDimension (显示尺寸接口)

核心职责:控制尺寸在工程图或模型视图中的具体显示方式和格式化细节。

IDisplayDimension 继承自 IAnnotation,专门用于处理尺寸的可视化表现。它关注的是“尺寸看起来是什么样”,而不是“尺寸驱动的几何数值是多少”。

  • 显示格式化:控制精度 (GetPrimaryPrecision2)、单位 (GetUnits)、分数/小数显示 (GetFractionBase)、双制式显示 (SetDual2) 以及公差显示的精度。
  • 视觉元素定制:管理箭头样式 (GetArrowHeadStyle2)、引线是否折断 (SetBrokenLeader2)、延伸线(Witness lines)的可见性与样式 (WitnessVisibility, SetLineFontExtensionStyle)、以及文字的对齐方式 (HorizontalJustification, VerticalJustification)。
  • 文字覆盖与链接:允许覆盖显示的数值 (SetOverride, SetOverrideValue),设置自定义文字 (SetText, SetLowerText),或将文字链接到特定变量 (SetLinkedText)。
  • 特殊尺寸类型处理:处理直径/半径的特殊显示 (Diametric, ShortenedRadius)、倒角格式 (ChamferTextStyle)、基准尺寸 (Ordinate) 和运行尺寸 (DisplayAsChain) 等特定逻辑。
  • 关联底层模型:通过 GetDimension2 方法可以获取到底层的 IDimension 对象,从而连接到实际的几何驱动数据。

3. IDimension (尺寸接口)

核心职责:管理驱动模型几何形状的实际数值、配置状态和公差定义。

IDimension 代表参数化模型中的实际尺寸对象。它是特征的一部分,直接控制模型的几何大小。它通常不直接处理“怎么画出来”,而是处理“数值是多少”以及“在哪些配置中生效”。

  • 数值管理:获取或设置尺寸的系统单位数值 (GetSystemValue3, SetSystemValue3) 或文档单位数值 (GetUserValueIn2, SetUserValueIn3)。这是驱动模型变化的关键。
  • 配置控制:决定尺寸是应用于所有配置还是特定配置 (IsAppliedToAllConfigurations),并能在不同配置中获取不同的值 (GetValue3)。
  • 状态管理:控制尺寸是否为驱动尺寸 (DrivenState)、是否只读 (ReadOnly)、是否由设计表驱动 (IsDesignTableDimension) 或是否为参考尺寸 (IsReference)。
  • 几何定义:管理尺寸的参考点 (ReferencePoints) 和所属特征 (GetFeatureOwner)。
  • 公差数据:虽然旧方法已废弃,但它通过 Tolerance 属性关联到 IDimensionTolerance 对象,用于定义具体的公差数值(最大/最小值),而非仅仅是显示格式。

三者关系总结

  1. 层次结构

    • IAnnotation 是最顶层的抽象,所有注释(含尺寸)都有它。
    • IDisplayDimensionIAnnotation 的特化,专门处理“尺寸”的显示层面。
    • IDimension 是独立于显示层面的数据层面,代表模型内部的参数。
  2. 工作流程

    • 当你需要改变模型的大小时,操作 IDimension (设置 Value)。
    • 当你需要在工程图中改变尺寸的样子(如改精度、加括号、改箭头)时,操作 IDisplayDimension
    • 当你需要移动尺寸的位置、改变其颜色图层时,通常通过 IDisplayDimension 继承自 IAnnotation 的方法进行操作。
    • 通过 IDisplayDimension.GetDimension2() 可以从显示对象找到数据对象;通过 IDimension 相关的显示逻辑可以找到对应的 IDisplayDimension(通常在视图中遍历获得)。



IAnnotation

IAnnotation Interface Members
The following tables list the members exposed by IAnnotation.

Public Properties
 	Name	Description
 Property	AnnotationView	Gets the annotation view for this annotation.  
 Property	BentLeaderLength	Gets or sets the length of the bent leader for this annotation.  
 Property	Color	Gets or sets the color of this annotation. Annotation color is supported only in SOLIDWORKS drawings.  
 Property	FrameLineStyle	Gets or sets the frame's line style for this annotation.  
 Property	FrameThickness	Gets or sets the frame's line thickness for this annotation.  
 Property	FrameThicknessCustom	Gets or sets the frame's line thickness for this annotation.  
 Property	Layer	Gets or sets the layer used by this annotation. Layers are supported only in SOLIDWORKS
drawings.  
 Property	LayerOverride	Gets or sets whether the annotation has properties that override the default properties of the layer.  
 Property	LeaderLineStyle	Gets or sets the leader's lines style for this annotation.  
 Property	LeaderThickness	Gets or sets the leader's line thickness for this annotation.  
 Property	LeaderThicknessCustom	Gets or sets the leader's custom line thickness for this annotation.  
 Property	Owner	
Gets the owner of this annotation.

NOTE: This property is a get-only property. Set is not implemented. 

 
 Property	OwnerType	
Gets the type of owner of this annotation.

NOTE: This property is a get-only property. Set is not implemented. 

 
 Property	Style	Gets or sets the line style for this annotation.  
 Property	UseDocDispFrame	Gets or sets whether to use the document's frame's line style and thickness or a specified line style and thickness for this annotation.  
 Property	UseDocDispLeader	Gets or sets whether to use the document's leader's line style and thickness or a specified line style and thickness for this annotation.  
 Property	Visible	Gets or sets the visibility state of this annotation.  
 Property	Width	Gets or sets the line width enumeration value for this annotation.  
Top
Public Methods
 	Name	Description
 Method	AddOrUpdateStyle	Adds or updates the annotation linked to the specified style.  
 Method	ApplyDefaultStyleAttributes	Applies the default style attribute to this annotation.  
 Method	CanShowInAnnotationView	Gets whether this annotation can be shown in the specified annotation view.  
 Method	CanShowInMultipleAnnotationViews	Gets whether this annotation can be shown in multiple annotation views.  
 Method	CheckSpelling	Spell checks the text in this annotation.  
 Method	ConvertToMultiJog	Converts a note with a leader to a note with a multi-jog leader.  
 Method	DeleteStyle	Deletes the specified style.  
 Method	DeSelect	Deselects this annotation.  
 Method	GetArrowHeadCount	Gets the number of arrowheads on this symbol.  
 Method	GetArrowHeadSizeAtIndex	Gets the arrow head size of the specified leader on this annotation.  
 Method	GetArrowHeadStyleAtIndex	Gets the arrow head style of a specific leader on this annotation.  
 Method	GetAttachedEntities	Obsolete. Superseded by IAnnotation::GetAttachedEntities2.  
 Method	GetAttachedEntities2	Obsolete. Superseded by IAnnotation::GetAttachedEntities3.  
 Method	GetAttachedEntities3	Gets the entities to which this annotation is attached.  
 Method	GetAttachedEntityCount2	Obsolete. Superseded by IAnnotation::GetAtatchedEntityCount3.  
 Method	GetAttachedEntityCount3	Gets the number of entities to which this annotation is attached.  
 Method	GetAttachedEntityTypes	Gets the types of entities attached to this annotation.  
 Method	GetBentLeader	Obsolete. Superseded by IAnnotation::GetLeaderStyle.  
 Method	GetDashedLeader	Gets whether this leader is a dashed line or a solid line.  
 Method	GetDimXpertFeature	Gets the DimXpert feature associated with this annotation.  
 Method	GetDimXpertName	Gets the DimXpert name for this annotation.  
 Method	GetDisplayData	Gets the display data for this annotation.  
 Method	GetFlipPlaneTransform	Gets the transformation matrix of the annotation plane in the opposite direction.  
 Method	GetLeader	Obsolete. Superseded by IAnnotation::GetLeaderStyle.  
 Method	GetLeaderAllAround	Gets the setting for all-around symbol display of this annotation.  
 Method	GetLeaderCount	Gets the number of leaders on this annotation.  
 Method	GetLeaderPerpendicular	Gets the perpendicular bent leader display setting for this annotation.  
 Method	GetLeaderPointsAtIndex	Gets coordinate information about a specified leader on this annotation.  
 Method	GetLeaderSide	Gets the leader attachment side setting for this annotation.  
 Method	GetLeaderStyle	Gets the style of this leader.  
 Method	GetMultiJogLeaderCount	Gets the number of multi-jog leaders on this annotation.  
 Method	GetMultiJogLeaders	Gets the multi-jog leaders on this annotation.  
 Method	GetName	Gets the name of this annotation.  
 Method	GetNext	Obsolete. Superseded by IAnnotation::GetNext3.  
 Method	GetNext2	Obsolete. Superseded by IAnnotation::GetNext3.  
 Method	GetNext3	Gets the next annotation.  
 Method	GetParagraphs	Gets the paragraphs in this note annotation.  
 Method	GetPlane	Gets the rotation matrix of the annotation relative to the X-Y plane of the model.  
 Method	GetPMIData	Gets the Product and Manufacturing Information (PMI) feature data object for this STEP 242 annotation.  
 Method	GetPMIType	Gets the type of Product and Manufacturing Information (PMI) associated with this STEP 242 annotation.  
 Method	GetPosition	Gets the position of this annotation.  
 Method	GetSmartArrowHeadStyle	Gets the setting for smart arrowhead style for this annotation.  
 Method	GetSpecificAnnotation	Gets the specific underlying object associated with this annotation.  
 Method	GetStyleName	Gets the name of the style applied to this annotation.  
 Method	GetTextFormat	Gets the text format for the specified text in this annotation.  
 Method	GetTextFormatCount	Gets the number of text formats for this annotation.  
 Method	GetType	Gets the type of the annotation.  
 Method	GetUseDocTextFormat	Gets whether SOLIDWORKS is currently using the document default text format setting for this annotation.  
 Method	GetVisualProperties	Gets the visual properties of this annotation.  
 Method	IGetAttachedEntities	Obsolete. Superseded by IAnnotation::GetAttachedEntities2.  
 Method	IGetAttachedEntityCount	Obsolete. Superseded by IAnnotation::GetAttachedEntityCount2.  
 Method	IGetAttachedEntityTypes	Gets the types of all entities attached to this annotation.  
 Method	IGetDisplayData	Gets the display data for the annotation.  
 Method	IGetLeaderPointsAtIndex	Gets coordinate information about a specified leader on this annotation.  
 Method	IGetMultiJogLeaders	Gets the multi-jog leaders on this annotation.  
 Method	IGetNext	Obsolete. Superseded by IAnnotation::GetNext3.  
 Method	IGetNext2	Obsolete. Superseded by IAnnotation::GetNext3.  
 Method	IGetPosition	Gets the position of this annotation.  
 Method	IGetSpecificAnnotation	Gets the specific underlying object associated with this annotation.  
 Method	IGetTextFormat	Gets the text format for the specified text in this annotation.  
 Method	IGetVisualProperties	Gets the visual properties of this annotation.  
 Method	IsDangling	Gets whether this annotation is dangling.  
 Method	IsDimXpert	Gets whether the annotation is a DimXpert annotation.  
 Method	ISetAttachedEntities	Attaches this annotation to the specified entities.  
 Method	ISetTextFormat	Sets the text format information for the specified text within this annotation.  
 Method	LoadStyle	Loads the specified style.  
 Method	SaveStyle	Saves the specified style.  
 Method	Select	Obsolete. Superseded by IAnnotation::Select3.  
 Method	Select2	Obsolete. Superseded by IAnnotation::Select3.  
 Method	Select3	Selects this annotation and marks it.  
 Method	SelectByMark	Obsolete. Superseded by IAnnotation::Select3.  
 Method	SetArrowHeadSizeAtIndex	Sets the size of the arrow head of the specified leader on this annotation.  
 Method	SetArrowHeadStyleAtIndex	Sets the arrow head style of a specific leader on this annotation.  
 Method	SetAttachedEntities	Attaches this annotation to the specified entities.  
 Method	SetLeader	Obsolete. Superseded by IAnnotation::SetLeader3.  
 Method	SetLeader2	Obsolete. Superseded by IAnnotation::SetLeader3.  
 Method	SetLeader3	Sets the leader characteristics for this annotation.  
 Method	SetLeaderAttachmentPointAtIndex	Sets the specified attachment point of a leader for an annotation with the specified index.  
 Method	SetName	Sets the name of this annotation.  
 Method	SetPosition	Obsolete. Superseded by IAnnotation::SetPosition2.  
 Method	SetPosition2	Sets the position of this annotation.  
 Method	SetStyleName	Sets the style for this annotation.  
 Method	SetTextFormat	Sets the text format for the specified text in this annotation.  

https://help.solidworks.com/2023/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IAnnotation_members.html

IDisplayDimension

IDisplayDimension Interface Members
The following tables list the members exposed by IDisplayDimension.

Public Properties
 	Name	Description
 Property	ArcExtensionLineOrOppositeSide	Gets or sets whether to attach or extend the radial dimension leader on this radial display dimension.  
 Property	ArrowSide	Gets or sets the position of the dimension arrows.  
 Property	CenterText	Gets or sets whether the text of this display dimension should be automatically centered.  
 Property	ChamferPrecision	Gets or sets the precision of the length and angle values in a chamfer display dimension.  
 Property	ChamferTextStyle	Gets or sets the text style for chamfer dimensions.  
 Property	Diametric	Gets or sets whether this display dimension is radial/single distance or diameter/doubled distance.  
 Property	DimensionToInside	Gets or sets whether dimensions to arcs are always to the inside of the arc.  
 Property	DisplayAsChain	Gets or sets whether the extension lines of every dimension in this set of angular running or ordinate dimensions are chained together.  
 Property	DisplayAsLinear	Gets or sets whether this diameter dimension is displayed as a linear dimension.  
 Property	Elevation	Gets or sets whether to display an elevation symbol, which is controlled by IDisplayDimension::EndSymbol, at the end of ordinate dimension extension lines.  
 Property	EndSymbol	Gets or sets the ordinate dimension end symbol.  
 Property	ExtensionLineExtendsFromCenterOfSet	Gets or sets whether extension lines extend from the center of this set of angular running dimensions.  
 Property	ExtensionLineSameAsLeaderStyle	Gets or sets whether to use leader line styles for extension line styles.  
 Property	ExtensionLineUseDocumentDisplay	Gets or sets whether to use the document settings for extension lines.  
 Property	Foreshortened	Gets or sets whether a linear dimension is foreshortened in a drawing.  
 Property	GridBubble	Gets or sets whether to display a grid bubble at the end of ordinate dimension extension lines.  
 Property	HorizontalJustification	Gets or sets the dimension text's horizontal justification.  
 Property	Inspection	Gets or sets whether a display dimension above the dimension line is displayed as an inspection dimension.  
 Property	IsLinked	Gets whether the dimension has text linked to it.  
 Property	Jogged	Gets or sets whether this ordinate or angular running dimension is jogged.  
 Property	LeaderVisibility	Gets or sets which leader lines (dimension lines) are visible on a display dimension.  
 Property	LowerInspection	Gets or sets whether a display dimension below the dimension line is displayed as an inspection dimension.  
 Property	MarkedForDrawing	Gets or sets whether this display dimension is marked to include in a drawing document.  
 Property	MaxWitnessLineLength	Gets or sets the maximum length of dimension extension lines.  
 Property	OffsetText	Gets or sets whether or not to offset the text of a dimension.  
 Property	RunBidirectionally	Gets or sets whether each dimension runs in a direction closest to the baseline in this angular running dimension.  
 Property	Scale2	Gets or sets the scale value that is applied to the dimension value of this non-associative distance dimension.  
 Property	ShortenedRadius	Gets or sets whether to display this radius display dimension with a foreshortened radius.  
 Property	ShowDimensionValue	Gets or sets whether the dimension value is displayed as part of the dimension text.  
 Property	ShowLowerParenthesis	Gets or sets whether to enclose the text below the dimension line of the display dimension in parentheses.  
 Property	ShowParenthesis	Gets or sets whether to enclose the text above the dimension line of the display dimension in parentheses.  
 Property	ShowTolParenthesis	Obsolete. Superseded by IDisplayDimension::ShowParenthesis.  
 Property	SmartWitness	Gets or sets the smart display of extension lines.  
 Property	SolidLeader	Gets or sets whether this display dimension is displayed with a solid leader for arc and radial dimensions.  
 Property	Split	Gets or sets whether to split a dual dimension above and below an unbroken dimension line (also called a leader).   
 Property	Type2	Gets the type of dimension.  
 Property	VerticalJustification	Gets the dimension text's vertical justification.  
 Property	WitnessVisibility	Gets or sets which extension lines are visible.  
Top
Public Methods
 	Name	Description
 Method	AddDisplayEnt	Overrides the display graphics of objects.  
 Method	AddDisplayText	Overrides the display text.  
 Method	AutoJogOrdinate	Sets the auto-jog for this ordinate dimension.  
 Method	ExplementaryAngle	Flips an angular dimension to its explementary angle.  
 Method	GetAlternatePrecision	Obsolete. Superseded by IDisplayDimension::GetAlternatePrecision2.  
 Method	GetAlternatePrecision2	Gets the displayed precision for the dual portion of this dimension.  
 Method	GetAlternateTolPrecision	Obsolete. Superseded by IDisplayDimension::GetAlternateTolPrecision.  
 Method	GetAlternateTolPrecision2	Gets the displayed precision for the dual tolerance portion of this dimension.  
 Method	GetAnnotation	Gets the IAnnotation object for this specific annotation.  
 Method	GetArcLengthLeader	Gets the leader style of this arc length dimension.  
 Method	GetArrowHeadStyle	Obsolete. Superseded by IDisplayDimension::GetArrowHeadStyle2.  
 Method	GetArrowHeadStyle2	Gets the arrowhead style used by this display dimension.  
 Method	GetAutoArcLengthLeader	Gets whether the leader style of this arc-length dimension is being automatically selected or selected by the user.  
 Method	GetBentLeaderLength	Gets the length of the bent leader to use when displaying this dimension.  
 Method	GetBrokenLeader2	Gets whether this display dimension has a broken or split leader.  
 Method	GetChamferUnits	Gets the local units of measurement for a chamfer display dimension.  
 Method	GetDefinitionTransform	Gets the transform for this dimension.  
 Method	GetDimension	Obsolete. Superseded by IDisplayDimension::GetDimension2.  
 Method	GetDimension2	Gets the model dimension used to create this display dimension.  
 Method	GetDisplayData	Gets the display data for this display dimension.  
 Method	GetExtensionLineAsCenterline	Gets whether the specified extension line is a centerline.  
 Method	GetFractionBase	Gets whether this display dimension is displayed as a decimal value or a fraction.  
 Method	GetFractionValue	Gets the largest fraction denominator to be used when this display dimension is displayed in fraction format.  
 Method	GetHoleCalloutVariables	Gets access to hole callout variables in a hole callout.  
 Method	GetJogParameters	Gets the jog in a linear dimension extension line.  
 Method	GetLinkedText	Gets the text linked to this display dimension.  
 Method	GetLowerText	Gets the text below the dimension line in a display dimension.  
 Method	GetNameForSelection	Gets the name of the selected display dimension needed by IModelDocExtension::SelectByID2.  
 Method	GetNext	Obsolete. Superseded by IDisplayDimension::GetNext5.  
 Method	GetNext2	Obsolete. Superseded by IDisplayDimension::GetNext5.  
 Method	GetNext3	Obsolete. Superseded by IDisplayDimension::GetNext5.  
 Method	GetNext4	Obsolete. Superseded by IDisplayDimension::GetNext5.  
 Method	GetNext5	Gets the next display dimension.  
 Method	GetOrdinateDimensionArrowSize	Gets the diameter of the circle for the arrow of the base ordinate dimension.  
 Method	GetOverride	Gets whether to display the actual dimension value or to override it with another value.  
 Method	GetOverrideValue	Gets the value to display instead of the actual dimension value.  
 Method	GetPrimaryPrecision	Obsolete. Superseded by IDisplayDimension::GetPrimaryPrecision2.  
 Method	GetPrimaryPrecision2	Gets the primary dimension precision setting for this display dimension.  
 Method	GetPrimaryTolPrecision	Obsolete. Superseded by IDisplayDimension::GetPrimaryTolPrecision2.  
 Method	GetPrimaryTolPrecision2	Gets the primary tolerance precision setting for this display dimension.  
 Method	GetRoundToFraction	Gets whether the displayed dimension value is rounded off so that SOLIDWORKS can display it as a fraction.  
 Method	GetSecondArrow	Gets whether this diameter display dimension has the second arrow enabled.  
 Method	GetSupportsGenericText	Gets whether the display dimension was created in SOLIDWORKS 2011 or later, which, if so, indicates that the display dimension is generic text.  
 Method	GetText	Gets the text above the dimension line in a display dimension.  
 Method	GetTextFormat	Obsolete. Superseded by IAnnotation::GetTextFormat.  
 Method	GetTextFormatItems	Gets the format tokens of the specified text portion of a multi-value display dimension.  
 Method	GetType	Obsolete. Superseded by IDisplayDimension::Type2.  
 Method	GetUnits	Gets the units used by this display dimension.  
 Method	GetUseDocArrowHeadStyle	Gets whether this display dimension uses the document default setting for dimension arrowhead style.  
 Method	GetUseDocBentLeaderLength	Gets whether this dimension is using the document default for bent leader length or not.  
 Method	GetUseDocBrokenLeader	Gets whether this display dimension uses the document default setting for displaying leaders as broken.  
 Method	GetUseDocDual	Gets whether this display dimension uses the document setting for positioning dual dimensions.  
 Method	GetUseDocPrecision	Obsolete. Not superseded.  
 Method	GetUseDocSecondArrow	Gets whether this diameter display dimension uses the document default setting for the display of the second outside arrow.  
 Method	GetUseDocTextFormat	Obsolete. Superseded by IAnnotation::GetUseDocTextFormat.  
 Method	GetUseDocUnits	Gets whether this display dimension uses the document default setting for units.  
 Method	GetWitnessLineGap	Gets the gap of the specified dimension extension line.  
 Method	IAddDisplayEnt	Overrides the display graphics of objects for this display dimension.  
 Method	IAddDisplayText	Overrides the display text for this display dimension.  
 Method	IGetAnnotation	Gets the IAnnotation object for this specific annotation.  
 Method	IGetDimension	Obsolete. Superseded by IDisplayDimension::GetDimension2.  
 Method	IGetDisplayData	Gets the display data for this display dimension.  
 Method	IGetNext	Obsolete. Superseded by IDisplayDimension::GetNext5.  
 Method	IGetNext2	Obsolete. Superseded by IDisplayDimension::GetNext5.  
 Method	IGetNext3	Obsolete. Superseded by IDisplayDimension::GetNext5.  
 Method	IGetTextFormat	Obsolete. Superseded by IAnnotation::IGetTextFormat.  
 Method	IsDimXpert	Obsolete. Superseded by IAnnotation::IsDimXpert.  
 Method	ISetTextFormat	Obsolete. Superseded by IAnnotation::ISetTextFormat.  
 Method	IsHoleCallout	Gets whether this display dimension is a hole callout.  
 Method	IsReferenceDim	Gets whether this display dimension is a reference dimension.  
 Method	ResetExtensionLineStyle	Resets the style of the specified extension line.  
 Method	SetArcLengthLeader	Sets the leader style of this arc-length dimension.  
 Method	SetArrowHeadStyle	Obsolete. Superseded by IDisplayDimension::SetArrowHeadStyle2.  
 Method	SetArrowHeadStyle2	Sets the arrowhead style of this display dimension.  
 Method	SetBentLeaderLength	Sets the bent leader length to use for this dimension.  
 Method	SetBrokenLeader2	Sets the broken leader display characteristic of this display dimension.  
 Method	SetDual	Obsolete. Superseded by IDisplayDimension::SetDual2.  
 Method	SetDual2	Controls the display of dual dimensions of this display dimension.  
 Method	SetExtensionLineAsCenterline	Sets whether the specified extension line is a centerline.  
 Method	SetJogParameters	Set the linear dimension extension line to be jogged.  
 Method	SetLineFontDimensionStyle	Sets the style of leader for this display dimension.  
 Method	SetLineFontDimensionThickness	Sets the thickness of leaders of this display dimension.  
 Method	SetLineFontExtensionStyle	Sets the line font style for the extension lines of this display dimension.  
 Method	SetLineFontExtensionThickness	Sets the thickness of the extension lines of this display dimension.  
 Method	SetLinkedText	Sets the text to link to this display dimension.  
 Method	SetLowerText	Sets the text below the dimension line in a display dimension.  
 Method	SetOrdinateDimensionArrowSize	Sets the diameter of the circle for the arrow of the base ordinate dimension if the base ordinate dimension standard is set to DIN.  
 Method	SetOverride	Sets whether to display the actual dimension value or to display another value, and, if so, that value.  
 Method	SetPrecision	Obsolete. Superseded by IDisplayDimension::SetPrecision2.  
 Method	SetPrecision2	Obsolete. Superseded by IDisplayDimension::SetPrecision3.  
 Method	SetPrecision3	Sets the number of digits to display after the decimal point for precision and tolerance values in this display dimension.  
 Method	SetSecondArrow	Sets the second arrow characteristics of this diameter display dimension.  
 Method	SetText	Sets the text above the dimension line in a display dimension.  
 Method	SetTextFormat	Obsolete. Superseded by IAnnotation::ISetTextFormat.  
 Method	SetUnits	Obsolete. Superseded by IDisplayDimension::SetUnits2.  
 Method	SetUnits2	Sets the unit display characteristics of this display dimension.  
 Method	SetWitnessLineGap	Sets the gap for the specified dimension extension line.  
 Method	SupplementaryAngle	Changes the angle in the selected angular dimension to its supplementary angle.  
 Method	Unlink	Unlinks a previously linked display dimension.  
 Method	VerticallyOppositeAngle	Flips an angular dimension to its vertically opposite angle.  

 

https://help.solidworks.com/2023/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IDisplayDimension_members.html

IDimension

IDimension Interface Members
The following tables list the members exposed by IDimension.

Public Properties
 	Name	Description
 Property	DimensionLineDirection	Gets or sets the direction of this dimension line.  
 Property	DrivenState	Gets or sets the driven state of a dimension.  
 Property	ExtensionLineDirection	Gets or sets the direction of the extension line.  
 Property	FullName	Gets the full name of a dimension including the feature and the model.  
 Property	Name	Gets or sets the name of a dimension.  
 Property	ReadOnly	Gets or sets the read-only state of a dimension.  
 Property	ReferencePoints	Gets or sets the reference points for this dimension.  
 Property	SystemValue	Obsolete. Superseded by IDimension::GetSystemValue3, IDimension::IGetSystemValue3, IDimension::SetSystemValue3, and IDimension::ISetSystemValue3.  
 Property	Tolerance	Gets the IDimensionTolerance object.  
 Property	Value	Obsolete. Superseded by IDimension::GetValue3, IDimension::IGetValue3, IDimension::ISetValue3, and IDimension::SetValue3.  
Top
Public Methods
 	Name	Description
 Method	GetArcEndCondition	Gets the end conditions for linear dimensions that end on an arc.  
 Method	GetFeatureOwner	Gets the feature for this dimension.  
 Method	GetNameForSelection	Gets the name of the selected dimension needed by IModelDocExtension::SelectByID2.  
 Method	GetReferencePointsCount	Gets the number of reference points for this dimension.  
 Method	GetSystemChamferValues	Gets the chamfer dimension values in system units.  
 Method	GetSystemValue2	Obsolete. See IDimension::GetSystemValue3 and IDimension::IGetSystemValue3.  
 Method	GetSystemValue3	Gets the value of the current dimension in system units in the named configuration.  
 Method	GetToleranceFitValues	Obsolete. Superseded by IDimensionTolerance::GetHoleFitValue and IDimensionTolerance::GetShaftFitValue.  
 Method	GetToleranceFontInfo	Obsolete. Superseded by IDimensionTolerance::GetFontUseDimension, IDimensionTolerance::GetFontUseScale, IDimensionTolerance::GetFontScale, and IDimensionTolerance::GetFontHeight.  
 Method	GetToleranceType	Obsolete. Superseded by IDimensionTolerance::Type.  
 Method	GetToleranceValues	Obsolete. Superseded by IDimensionTolerance::GetMaxValue and IDimensionTolerance::GetMinValue.  
 Method	GetType	Gets the type of dimension.  
 Method	GetUserValueIn	Gets the value of this dimension in the units of the specified document.  
 Method	GetValue2	Obsolete. Superseded by IDimension::GetValue3 and IDimension::IGetValue3.  
 Method	GetValue3	Gets the values of the dimensions in the specified configurations.  
 Method	IGetReferencePoints	Gets the reference points for this dimension.  
 Method	IGetSystemValue3	Gets the value of the current dimension in system units in the named configuration.  
 Method	IGetToleranceFontInfo	Obsolete. Superseded by IDimensionTolerance::GetFontUseDimension, IDimensionTolerance::GetFontUseScale, IDimensionTolerance::GetFontScale, and IDimensionTolerance::GetFontHeight.  
 Method	IGetToleranceValues	Obsolete. Superseded by IDimensionTolerance::GetMaxValue and IDimensionTolerance::GetMinValue.  
 Method	IGetUserValueIn	Obsolete. Superseded by IDimension::IGetUserValueIn2.  
 Method	IGetUserValueIn2	Gets the value of this dimension in the units of the specified document.  
 Method	IGetValue3	Gets the values of the dimensions in the specified configurations.  
 Method	IsAppliedToAllConfigurations	Gets whether a dimension is currently applied to all configurations of the model or to just the current configuration.  
 Method	IsDesignTableDimension	Gets whether this dimension is driven by a design table.  
 Method	ISetReferencePoints	Sets the reference points for this dimension.  
 Method	ISetSystemValue3	Sets the value of this dimension in system units (meters) in the specified configuration.  
 Method	ISetUserValueIn	Obsolete. Superseded by IDimension::ISetUserValueIn3.  
 Method	ISetUserValueIn2	Obsolete. Superseded by IDimension::ISetUserValueIn3.  
 Method	ISetUserValueIn3	Sets the value of this dimension in the units of the specified document.  
 Method	ISetValue3	Sets the values of the dimensions in the specified configurations.  
 Method	IsReference	Gets whether the dimension is a reference dimension.  
 Method	SetArcEndCondition	Sets the end conditions for linear dimensions that end on an arc.  
 Method	SetSystemValue2	Obsolete. Superseded by IDimension::SetSystemValue3.  
 Method	SetSystemValue3	Sets the value of this dimension in system units (meters) in the specified configuration.  
 Method	SetToleranceFitValues	Obsolete. Superseded by IDimensionTolerance::SetFitValues.  
 Method	SetToleranceFontInfo	Obsolete. Superseded by IDimensionTolerance::SetFont.  
 Method	SetToleranceType	Obsolete. Superseded by IDimensionTolerance::Type.  
 Method	SetToleranceValues	Obsolete. Superseded by IDimensionTolerance::SetValues.  
 Method	SetUserValueIn	Obsolete. Superseded by IDimension::SetUserValueIn2.  
 Method	SetUserValueIn2	Sets the value of this dimension in the units of the specified document.  
 Method	SetValue2	Obsolete. Superseded by IDimension::SetValue3.  
 Method	SetValue3	Sets the values of the dimensions in the specified configurations.  

https://help.solidworks.com/2023/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IDimension_members.html

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐