Using the "Copy Properties" function in a drawing

Hubert_Los
Advocate
Advocate

Using the "Copy Properties" function in a drawing

Hubert_Los
Advocate
Advocate

Hi,

How to copy dimension properties to another dimension?

Hubert_Los_0-1684182649552.png



Thank you for all your help 

0 Likes
Reply
Accepted solutions (1)
224 Views
1 Reply
Reply (1)

JelteDeJong
Mentor
Mentor
Accepted solution

There is no easy API call o do the same. But you can copy each property individually from one to the other. something like this:

Dim dimension1 As LinearGeneralDimension = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDimensionFilter, "")
Dim dimension2 As LinearGeneralDimension = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDimensionFilter, "")

dimension2.Style = dimension1.Style
dimension2.Layer = dimension1.Layer
dimension2.Text.FormattedText = dimension1.Text.FormattedText
dimension2.Precision = dimension1.Precision
dimension2.IsInspectionDimension = dimension1.IsInspectionDimension
dimension2.FirstArrowheadType = dimension1.FirstArrowheadType
dimension2.SecondArrowheadType = dimension1.SecondArrowheadType
dimension2.ArrowheadsInside = dimension1.ArrowheadsInside

But not all dimension types have the same properties therefore when a user (or code) selects a dimension you need to know what kind of dimension you are dealing with. And act according to that.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes