USB Memory
Mechanical
Hi all
I have a question about CATIA VBA.
I want to get a Dimension Line coordinate like (X and Y) in VBA.
There is the "MoveValue" method in "Dimension3D" object for changing a Dimension Line coordinate.
But I cant't find a current Dimension Line coordinate.
I think there are properties have the coordinate in somewhere.
If someone know or find it, let me know way to get the coordinate
This is a sample script bellow for only changing dimension coordinate.
If some same dimension names are exist, this script is not working.
Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
Set selection1 = productDocument1.Selection
selection1.Search "CATTPSSearch.TPSDimensionAnnot.Name='Dimension.1',all"
Dim x As Double: x = 20
Dim y As Double: y = 0
Dim e As Long: e = 2
Dim rd As Long: rd = 0
Dim ano As Annotation
Set ano = selection1.Item(1).Value
Call ano.Dimension3D.MoveValue(x, y, e, rd)
Regards.
I have a question about CATIA VBA.
I want to get a Dimension Line coordinate like (X and Y) in VBA.
There is the "MoveValue" method in "Dimension3D" object for changing a Dimension Line coordinate.
But I cant't find a current Dimension Line coordinate.
I think there are properties have the coordinate in somewhere.
If someone know or find it, let me know way to get the coordinate
This is a sample script bellow for only changing dimension coordinate.
If some same dimension names are exist, this script is not working.
Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
Set selection1 = productDocument1.Selection
selection1.Search "CATTPSSearch.TPSDimensionAnnot.Name='Dimension.1',all"
Dim x As Double: x = 20
Dim y As Double: y = 0
Dim e As Long: e = 2
Dim rd As Long: rd = 0
Dim ano As Annotation
Set ano = selection1.Item(1).Value
Call ano.Dimension3D.MoveValue(x, y, e, rd)
Regards.