Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

DrwDitto Scale 1

Status
Not open for further replies.

ferdo

Mechanical
Jul 4, 2002
2,843
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
 
Replies continue below

Recommended for you

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
 
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
 
Hello,

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

Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor