Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

parenthesis on ref dimension

Status
Not open for further replies.

vasinka

Mechanical
Mar 14, 2013
37
0
0
US
Hi all, I am noew to Catia I have use NX most of the time till now.

I am using V5 R21 CATIA.

Is there an easy way to put parenthesis around a reference dimentions? Or mabe a settings that by default perenthasis will be added? I am puting alot of reference dimensions and and it istime consuming (and annoying)to press so many bottons just to place parenthesis around a value. Currently I am just typing them in the 'text before' and 'text after. fields.

Yes in NX its one click and paranthesis are applied...

Thank you.
 
Replies continue below

Recommended for you

Copy Object Format (paint brush in the Graphic Properties toolbar) will apply the text from a selected object to a desired target.

Alternatively, multi-select the target dimensions, go to the properties window and add them under the Dimension Texts tab.
 
Here is a macro catscript that I found a few years ago, exactly what you want.
You can add the macro to a toolbar, then it would be one-click operation.
I have used it on V5R18 many times , haven't tried it on V5R21. (I assume that it will work on 21).
You can multi select dimensions that are even in different views, run the macro and you should have () on them all.

Copy and paste the following to a macro catscript:

Sub CATMain()

Dim MySel As Selection
Set MySel = CATIA.ActiveDocument.Selection

Dim MyDim As DrawingDimension
Dim Array1 As String
Dim Array2 As String
Dim Array3 As String
Dim Array4 As String
For i = 1 To MySel.Count
If TypeName(MySel.Item(i).Value) = "DrawingDimension" Then
Set MyDim = MySel.Item(i).Value
MyDim.GetValue.GetBaultText 1,Array1,Array2,Array3,Array4
MyDim.GetValue.SetBaultText 1, "(", ")",Array3,Array4
End If
Next

End Sub
 
Status
Not open for further replies.
Back
Top