Dears,
Is there any solution that can get the position of dimension value?
I'm trying check it in center between dimension lines or not.
Please help me! Thanks!
Dears,
Is there any solution that can get the position of dimension value?
I'm trying check it in center between dimension lines or not.
Please help me! Thanks!
Hi @ngnam1988
There is a function to put the dimension in the center. See help page here
Syntax
LinearGeneralDimension.CenterText()
Hi @ngnam1988
There is a function to put the dimension in the center. See help page here
Syntax
LinearGeneralDimension.CenterText()
Thanks @A.Acheson
But I wanna check some dimensions are in center already or not before recenter them. Is it possible to do?
Thanks @A.Acheson
But I wanna check some dimensions are in center already or not before recenter them. Is it possible to do?
Not as I can see. The function just centers the dim regardless of its origional position.
Not as I can see. The function just centers the dim regardless of its origional position.
try:
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim oLdim As LinearGeneralDimension
oLdim = oDoc.ActiveSheet.DrawingDimensions.Item(1)
Dim oLs2d As LineSegment2d
oLs2d = oLdim.DimensionLine
MessageBox.Show(oLs2d.MidPoint.X & "," & oLs2d.MidPoint.Y, "Dimension Line Center Point")
MessageBox.Show(oLdim.Text.Origin.X & "," & oLdim.Text.Origin.Y, "Dimension Text Point")
oLdim.CenterText
MessageBox.Show(oLs2d.MidPoint.X & "," & oLs2d.MidPoint.Y, "Dimension Line Center Point")
MessageBox.Show(oLdim.Text.Origin.X & "," & oLdim.Text.Origin.Y, "Dimension Text Point")
try:
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim oLdim As LinearGeneralDimension
oLdim = oDoc.ActiveSheet.DrawingDimensions.Item(1)
Dim oLs2d As LineSegment2d
oLs2d = oLdim.DimensionLine
MessageBox.Show(oLs2d.MidPoint.X & "," & oLs2d.MidPoint.Y, "Dimension Line Center Point")
MessageBox.Show(oLdim.Text.Origin.X & "," & oLdim.Text.Origin.Y, "Dimension Text Point")
oLdim.CenterText
MessageBox.Show(oLs2d.MidPoint.X & "," & oLs2d.MidPoint.Y, "Dimension Line Center Point")
MessageBox.Show(oLdim.Text.Origin.X & "," & oLdim.Text.Origin.Y, "Dimension Text Point")
Can't find what you're looking for? Ask the community or share your knowledge.