Hi guys.
I am trying to make a script to get the dimensions from the drawing and send them in to the BoM.
I am stuck at getting the dimension value and assigning it to a string.
I tried to make this one work, one of Fernando's, which changes the color of all dimensions and by using "sel" instead of "all", it does change only the selected dimension.
How can I get the main value of the dimension?
Thanks!
I am trying to make a script to get the dimensions from the drawing and send them in to the BoM.
I am stuck at getting the dimension value and assigning it to a string.
I tried to make this one work, one of Fernando's, which changes the color of all dimensions and by using "sel" instead of "all", it does change only the selected dimension.
How can I get the main value of the dimension?
Thanks!
Code:
Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument
'~ ******* select all dimensions in drawing
Dim selection1 As Selection
Set selection1 = drawingDocument1.Selection
selection1.Search "CATDrwSearch.DrwDimension,all"
'~ ******* change color of selection (it will be magenta - RGB code 255,0,255)
Set visPropertySet1 = selection1.VisProperties
visPropertySet1.SetRealColor 255,0,255,0
selection1.Clear