hexagon logo

ctrl+p

Hi
I have some viewsets on my program. I can show them with recall viewset command on the Graphics Display Window... What i want to do is to print Graphics Display Window with a basic script on pcdmis program. I think there are lots of ways to do this ( e.g. sendkeys "^p" (ctrl+p) or cadwindow.print....) Could you please help me how should i type a code to solve my problem. Waiting for your answers...
Parents
  • Hi again...

    I typed such a script.

    "
    Sub Main
    Dim App As Object
    Set App = CreateObject ("PCDLRN.Application")
    Dim Part As Object
    Set Part = App.ActivePartProgram

    Dim DmisCommands As Object
    Set DmisCommands = Part.Commands

    Dim DmisCommand As Object

    dim wind as object
    set wind = part.cadwindows

    msgbox wind.count

    t = wind(1).print(CADPRINT_ONEPAGESCALE, false)

    msgbox t

    End Sub
    "

    When it works I get 2 messages that says "1' for code "msgbox wind.count" and "True" for code "msgbox t".

    Explanation of CADWindow.print function on help file says:

    "
    CadWindow.Print
    Syntax

    Return Value=expression.Print(long Option, BOOL DrawRuler)

    Return Value: This method returns a boolean value. Boolean returns true if the function succeeds, false if it fails.
    "

    Evenif I get TRUE value for cadwindow.print function . I can't get any print out from my printer.

    Could you please help me how I can solve this problem?
Reply
  • Hi again...

    I typed such a script.

    "
    Sub Main
    Dim App As Object
    Set App = CreateObject ("PCDLRN.Application")
    Dim Part As Object
    Set Part = App.ActivePartProgram

    Dim DmisCommands As Object
    Set DmisCommands = Part.Commands

    Dim DmisCommand As Object

    dim wind as object
    set wind = part.cadwindows

    msgbox wind.count

    t = wind(1).print(CADPRINT_ONEPAGESCALE, false)

    msgbox t

    End Sub
    "

    When it works I get 2 messages that says "1' for code "msgbox wind.count" and "True" for code "msgbox t".

    Explanation of CADWindow.print function on help file says:

    "
    CadWindow.Print
    Syntax

    Return Value=expression.Print(long Option, BOOL DrawRuler)

    Return Value: This method returns a boolean value. Boolean returns true if the function succeeds, false if it fails.
    "

    Evenif I get TRUE value for cadwindow.print function . I can't get any print out from my printer.

    Could you please help me how I can solve this problem?
Children
No Data