Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catia macro: how to get the dimension text position

Status
Not open for further replies.

xluo3562

Electrical
Joined
Apr 6, 2017
Messages
6
Location
HK
Hello guys,
Is there a method to retrieve the dimension text position data? I failed to find the a way to do it.
I intend to give number 001,002...to all the dimensions automatically. This number text is placed nearby the dimension text.
Thanks in advance.

Regards,
Louis
 
You could add text [001,002,... ] to Value with "SetPSText" or SetBaultText". Then the position of text does not matter.
 
Hello Romaleee,
what would be the code to do that exactly?

what i want to do is to give numbering to all the dimensions in the sheet from 1 to n, the number supposed nearby the dimension text. So i need to get the dimension text position.

is there a way to do it?

BR,
Louis

 
I think what Romaleee is referring to are the "Insert text before" and "Insert text after" manipulators

regards,
LWolf
 
It's exactly like Lwolf said. You can add text with code in this fields...

Capture_01_wj6ef6.jpg


With this your text will always stick with dimension value.
 
and the code...

Code:
Dim oDim As DrawingDimension
Set oDim = drawingDimensions1.Item("Dimension.1")

Dim oValue As DrawingDimValue
Set oValue = oDim.GetValue

oValue.SetBaultText 1, "before - ", " - after", "upper", "lower"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top