Apprentice Print Range

Apprentice Print Range

Anonymous
Not applicable
578 Views
7 Replies
Message 1 of 8

Apprentice Print Range

Anonymous
Not applicable
Help says that the printmanager print range defaults to kPrintCurrentSheet.
It also says Setting the PrintRange to kPrintCurrentSheet is not allowed in
the context of Apprentice

I have looked over my code and can't find any place I am setting it to
kPrintAllSheets, but yet that seems to be what it is defaulting to. If I
try to set it to kPrintCurrentSheet it of course errors out.

Is anyone able to use the currentsheet setting in apprentice?
--
___________________
Kent Keller
www.kwikmcad.com
0 Likes
579 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
Kent,

The 'current sheet' setting is not supported in Apprentice. The only options
in Apprentice are 'all sheets' which is the default, or a specific range.

Sanjay-


"Kent Keller" wrote in message
news:5246848@discussion.autodesk.com...
Help says that the printmanager print range defaults to kPrintCurrentSheet.
It also says Setting the PrintRange to kPrintCurrentSheet is not allowed in
the context of Apprentice

I have looked over my code and can't find any place I am setting it to
kPrintAllSheets, but yet that seems to be what it is defaulting to. If I
try to set it to kPrintCurrentSheet it of course errors out.

Is anyone able to use the currentsheet setting in apprentice?
--
___________________
Kent Keller
www.kwikmcad.com
0 Likes
Message 3 of 8

Anonymous
Not applicable
Right,

I ended up emulating the Current Sheet by getting the active sheet number and using that as the start and end of a range.

~Tom
0 Likes
Message 4 of 8

Anonymous
Not applicable
Thanks Sanjay and Tom. I get what help is saying now. I was thinking it
was saying it was supposed to default to current sheet.

Sure seems funny that you can do Toms method, but the printmanager isn't
able to get it.

--

Kent Keller
wrote in message news:5246879@discussion.autodesk.com...
Right,

I ended up emulating the Current Sheet by getting the active sheet number
and using that as the start and end of a range.

~Tom
0 Likes
Message 5 of 8

Anonymous
Not applicable
Well, I'm not exactly sure what Tom meant by "getting the active sheet
number" in Apprentice. The ActiveSheet property is supported only on the
DrawingDocument interface (in Inventor). Apprentice does not provide this
information at all (at least as far as I know).

Perhaps Tom can elaborate on how exactly he determines which the active
sheet is.

Sanjay-


"Kent Keller" wrote in message
news:5246952@discussion.autodesk.com...
Thanks Sanjay and Tom. I get what help is saying now. I was thinking it
was saying it was supposed to default to current sheet.

Sure seems funny that you can do Toms method, but the printmanager isn't
able to get it.

--

Kent Keller
wrote in message news:5246879@discussion.autodesk.com...
Right,

I ended up emulating the Current Sheet by getting the active sheet number
and using that as the start and end of a range.

~Tom
0 Likes
Message 6 of 8

Anonymous
Not applicable
I was just coming to post back and say I couldn't find out how to determine
the active sheet in apprentice.

Oh well I think this customer only prints all sheets anyhow.

--

Kent Keller
"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5246965@discussion.autodesk.com...
Well, I'm not exactly sure what Tom meant by "getting the active sheet
number" in Apprentice. The ActiveSheet property is supported only on the
DrawingDocument interface (in Inventor). Apprentice does not provide this
information at all (at least as far as I know).

Perhaps Tom can elaborate on how exactly he determines which the active
sheet is.

Sanjay-
0 Likes
Message 7 of 8

Anonymous
Not applicable
My bad Sanjay,

I actually used the Inventor Viewer ocx along with Apprentice in a stand alone application for viewing and printing.

So I am actually pulliing the sheet index from the Viewer module.

The code that follows is the core printing sub routine for that application.

--- VB6 Code Follows ---

[code]
Private Sub PrintFile(ByVal bPrintAll As Boolean)
Dim oPrnt As InventorApprentice.ApprenticeDrawingPrintManager
If oView.FileName = "" Then Exit Sub

Set oPrnt = oView.ApprenticeServerDocument.PrintManager

oView.HideToolbar = True
oView.Interactive = False

Me.Enabled = False
Screen.MousePointer = 11

With oPrnt
.SetCurrentView oView.ClientView
.PaperSize = PaperSize
.Orientation = kLandscapeOrientation
.ScaleMode = kPrintBestFitScale

If bPrintAll = True Then
.PrintRange = kPrintAllSheets
Else
.PrintRange = kPrintSheetRange
Call .SetSheetRange(oView.SheetIndex, oView.SheetIndex)
End If

.SubmitPrint
End With

Set oPrnt = Nothing

Me.Enabled = True
Screen.MousePointer = 1

oView.HideToolbar = False
oView.Interactive = True
End Sub

[/code]
0 Likes
Message 8 of 8

Anonymous
Not applicable
Hello all!

Hm, im have the opposit problem...

I want to print all sheets but apprentice will only print the activesheet. My code looks like this:
---------------------------------------------------------------------
...
...
oPM.Printer = "OMTPSA3"
oPM.Orientation = GetOrientation(oApprDrawingDoc)
oPM.PaperSize = GetSize(oApprDrawingDoc)
oPM.ScaleMode = kPrintBestFitScale
oPM.PrintRange = kPrintAllSheets
Call oPM.PrintToFile(sPostScriptPath)
---------------------------------------------------------------------

Ive also tried using a print range but still no luck :(, its only the activesheet that gets printed.

The differnce with my code is that i use ".PrintToFile", is there a bug in PrintTofile perhaps?

(i use Inv.11 sp2)
0 Likes