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
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
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
indocti discant et ament meminisse periti
RE: DrwDitto Scale
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
Thanks... this latin stuff is from Charles-Jean-François Hénault.
indocti discant et ament meminisse periti