×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

DIMENSION REF MACRO

DIMENSION REF MACRO

DIMENSION REF MACRO

(OP)
can anyone post a simple macro that will do this.
1)preselect a dimension on a drawing.
2)run a macro that will make that dimension reference by adding a ( ) before and after the dimension.

i'm no good at macros and i did the macro recorded but the macro errors out when i run it afterwards.
it doesn't seem like much but when you have to add () to a bunch of dimensions manually it just plain sucks.
thanks for any advise.

RE: DIMENSION REF MACRO

Multi select the dimensions you desire to have "(" and ")" added to.
Select the copy icon (looks like a paintbrush) from the Graphic Properties toolbar.
Select a dimension which has the "(" and ")" already added to it.

RE: DIMENSION REF MACRO

(OP)
thanks weavedreamer. i tried that and it worked pretty slick. thats one of those buttons i've just never clicked on.

RE: DIMENSION REF MACRO

Hi,

I also prefer CATIA native commands but the method described above has some small inconvieniences...for example you have to unlock drawing views, then you have to take care how dimensions was written (horizontal or vertical). The format painter will change the dimensions texts orientation also to be same like the source text.

Bellow there is a CATScript which is working in a multiple selection exactly like format painter but without having the issues described.

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

Regards
Fernando

https://picasaweb.google.com/102257836106335725208

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources