×
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

DrwDitto Scale

DrwDitto Scale

DrwDitto Scale

(OP)
Hi,

Does anybody know how to scale a drawing ditto (2D Component instance)?

I have following macro and I want to put all dittos at another scale.

Unfortunately, I can't find anything in documentation (or I don't know how to find it).

Language="VBSCRIPT"

Sub CATMain()

Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = drawingDocument1.Selection

selection1.Search "CATDrwSearch.DrwDitto.Name=Symbol,all"

End Sub

Thanks in advance

Regards
Fernando

RE: DrwDitto Scale

Have fun

Sub CATMain()

Dim oActivDoc As DrawingDocument
Set oActivDoc = CATIA.ActiveDocument

For ss = 1 To oActivDoc.Sheets.Count

For vv = 1 To oActivDoc.Sheets.Item(ss).Views.Count

For cc = 1 To oActivDoc.Sheets.Item(ss).Views.Item(vv).Components.Count

oActivDoc.Sheets.Item(ss).Views.Item(vv).Components.Item(cc).Scale2 = 0.1

Next cc

Next vv

Next ss

End Sub

Eric N.
indocti discant et ament meminisse periti

RE: DrwDitto Scale

(OP)
Hi Eric,

I really like your signature (Let the unlearned learn, and the learned delight in remembering).

That's really help. A star from me.

I just delete cc, vv and ss which are after Next and everything worked fine (I'm working under HP-UNIX).

Thanks again. And by the way, I didn't know that selection its slower (its like you said, every day you learn something).

Regards
Fernando

RE: DrwDitto Scale

Hello,

Thanks... this latin stuff is from Charles-Jean-François Hénault.

Eric N.
indocti discant et ament meminisse periti

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