I'm trying to write a macro that processes dimensions in our assembly drawings but am having trouble. All the examples I have seen say to get the first display dimension in the view and then use GetDimension on the display dimension. Correct me if I am wrong, but display dimensions are used in the model right?
Get Annotation first, then displaydimension, then dimension, then dimenisontolerance.
Annotation is everything in a drawing part assembly. from annotation you can check the type, and hand over to the appropriate object. for example displaydimension. from displaydimension you can get dimenion. this dimension has properties such as readonly and driven, override ect. from dimensions we can get dimenisontolerance.
Private _Annotation As Annotation
Private _Note As Notes
Private _DisplayDimension As DisplayDim
Private _Dimension As Dimension
Private _DimensionTolerance As DimensionTolerance
Private _Block As Blocks
Private _CenterLine As CenterLines
Private _CenterMarkSym As CenterMarkSyms
Private _CThread As CThreads
Private _CustomSymbol As CustomSymbols
Private _DatumOrigin As DatumOrigins
Private _DatumTag As DatumTags
Private _DatumTargetSym As DatumTargetSyms
Private _DowelSym As DowelSyms
Private _Leader As Leaders
Private _Gtol As GTols
Private _RevisionCloud As RevisionClouds
Private _SFSymbol As SFSymbols
Private _TableAnnotation As TableAnnotations
Private _WeldBeadSymbol As WeldBeadSymbols
Private _WeldSymbol As WeldSymbols
What about dimensions that were added to the drawing manually after the drawing was created? I can't seem to gain access to these. I've tried going the GetAnnotation route with the overall drawing itself and then call GetType on the annotation returned but dimension does not seem to be in that category. Any help would be appreciated, Thanks.
ModelItems is the key to change dimensions on a drawing. if the dimesion was created on the drawing. your only option is the override the value. thats ugly. make sure to check a modelitem for readonly, and driven state.