Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

CYCLE THROUGH CAPTURE SELECTION AND DISPLAY EACH CAPTURE ONE BY ONE FOR PRINTING

Status
Not open for further replies.

Thosnow

Aerospace
Feb 23, 2017
68
CA
Hello Ferdo and Others

I am trying to cycle through Captures, one by one, for printing the screens. See partial VBA code at bottom and attached image for more info.

However, when running the code to cycle through the captures, there are small "CATIA V5" windows appeared as seen on attached image. If I remove the "MsgBox CurCapture.DisplayCapture" statement, captures are not able to cycle and displayed for printing.

1) How can I still cycle and display the captures, one by one for printing but without the small "CATIA V5" windows?

Also, I want to obtain the capture's name/value (ex: PART INFORMATION) displayed just before the actual screen appeared (to confirm the right screen displaying before printing). I look at property "Name" of Captures but it won't work. How could I obtain captures' name (or value) for displaying?

Any suggestion or example code?

Thank you again

Quin

============================== VBA CODE =====================

' Set the first annotation set
Dim AnnoSet1 As AnnotationSet
Set AnnoSet1 = oAnnotationSets.Item(1)

' Get the number of captures in "annotSet1" above
Dim NumberCaptures As Integer
NumberCaptures = AnnoSet1.Captures.Count

MsgBox "Number of annotation sets is: " & oAnnotationSets.Count & " and number of captures is: " & NumberCaptures

' Loop through capture collection
Dim j As Integer
For j = 1 To NumberCaptures

' Display the current capture
Set CurCapture = AnnoSet1.Captures.Item(j)

MsgBox CurCapture.DisplayCapture

Next
 
 http://files.engineering.com/getfile.aspx?folder=6b42fda9-276d-47c5-903c-f603cec4ad4d&file=Capture.JPG
Replies continue below

Recommended for you

Code:
[b][highlight #FCE94F]MsgBox[/highlight][/b] CurCapture.DisplayCapture

does the small CATIA V5 window... remove that function and voila

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

Part and Inventory Search

Sponsor

Back
Top