From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Code -41 Printer not activated

Hello,

 

I recently installed DIAdem 2015 64 bit on a clients machine and he can no longer print .pdf reports on his original 32 bit 2012 version of DIAdem as well as in the 2015 version I just installed.

 

When we try to print a report to a pdf we get the following error

 

 

" Printer not activated, error code -41"

 

We are to print to .ppt and .xml

 

We are able to print to .pdf in other applications/

 

In addition we do not have the ability to add script shortcuts to his 2015 verison of DIAdem.  I am not sure if this is an bug or a change in features to 2015 BASIC version of DIAdem.

 

Thanks

Tim
0 Kudos
Message 1 of 18
(7,686 Views)

Hi Tim,

 

Try closing all DIAdem versions, then go to the Windows list of printers and delete the DIAdem PDF Printer.  Now relaunch DIAdem 2012 and see if that helps.

 

I am uunaware of any changes in DIAdem 2015 designed to prohibit script shortcut keys for the Base edition.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 18
(7,654 Views)

Brad

 

I am able to print .pdf files again thanks!

 

However my clients 2015 base verison does not allow him to access to the script shortcuts.

 

Since you have confimred this is not a change in the features available to DIadem then it must be a bug or incorrect setting?

 

 

Tim
0 Kudos
Message 3 of 18
(7,592 Views)

Hi Tim,

 

What you are seeing is very similar to the following forum:

 

http://forums.ni.com/t5/DIAdem/Script-button-on-panel-bar-greyed-out/td-p/3159650

 

DIAdem Base allows the user to run scripts, but the shortcut features involved in creating scripts are available only in Advanced and Professional Editions.  This link details this more:

 

http://www.ni.com/diadem/buy/

 

Hope that helps provide context!

 

Michael

Michael Keane
National Instruments
0 Kudos
Message 4 of 18
(7,582 Views)

SO how does a user run scripts in diadem base if the shortcut tab is greyed out?

 

 

Also

 

This functionality was available in the 2012 base version my clients were using.

Tim
0 Kudos
Message 5 of 18
(7,577 Views)

A user with DIAdem Base can double click on a .vbs file and run it, but to have access to the scripting feature themselves one would need Advanced or Professional.  This was the case in prior versions of DIAdem as well, so if a client had access to scripting features then they would have had a license higher than Base.

Michael Keane
National Instruments
0 Kudos
Message 6 of 18
(7,561 Views)

This isn't what I am seeing with my 2012 basic users.

 

They are able to set and have acess to the script shortcuts which are actuated by pressing the "shift" plus the coressponding F key. The script short cuts are greyed out and do not allow the user to create any short cuts.

 

Below is a screen shot of the shortcut location I am refereing to (not greyed out).  All of my 2012 clients are able to add or remove shortcut links to scripts here but non of my 2015 clients can.

 

 

 

 

Error.png

Tim
0 Kudos
Message 7 of 18
(7,558 Views)

Hi Tim,

 

The greyed out icon in DIAdem 2015 that was active in DIAdem 2012 is simply a bug in DIAdem 2015.  We apologize for the hassle, it will be fixed in DIAdem 2015 SP1, which will be released soon.  In the meantime let me know if you want assistance configuring your DIAdem 2015 Base versions to add a custom icon at startup as a workaround.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 8 of 18
(7,535 Views)

Sounds good Brad.

 

ANy help with the custom icon would be appricated.

Tim
0 Kudos
Message 9 of 18
(7,532 Views)

Hi Tim,

 

Save this code to a *.VBS file, then run it once in DIAdem to add the icon.  For your DIAdem 2015 Base version, you will need to configure this script to run automatically on startup in the DIAdem Settings dialog.

 

Call AddPanelIcon()
Call FileNameGet("ANY", "FileRead", ScriptReadPath, "VBScript,*.VBS", , , "Select the VBScript to Run")
IF DlgState = "IDOk" THEN Call ScriptStart(FileDlgFileName)


Sub AddPanelIcon()
  Dim ButtonIDs, ButtonNames, ButtonIcons, ButtonScripts
  ButtonIDs = Array("Separator", "RunVBScript")
  ButtonNames = Array("", "Run VBScript")
  ButtonIcons = Array("", "SCRAutVBSStartFile.ico")
  ButtonScripts = Array("", AutoActPath & AutoActName & ".VBS")
  Call AddActionObjects(ButtonIDs, ButtonNames, ButtonIcons, ButtonScripts)
  Call AddButtons(BarManager.Bars("DIAPanels"), ButtonIDs, Array(1, 1))
End Sub ' AddViewIcon()


Function AddActionObjects(ButtonIDs, ButtonNames, ButtonIcons, ButtonScripts)
  Dim j, iMax, jMax, ActionObjects, ActionObj
  ActionObjects = Array("")
  IF IsArray(ButtonIDs) THEN
    jMax = UBound(ButtonIDs)
    ReDim ActionObjects(jMax)
    ReDim Preserve ButtonNames(jMax)
    ReDim Preserve ButtonIcons(jMax)
    ReDim Preserve ButtonScripts(jMax)
    FOR j = 1 TO jMax
      IF ButtonIDs(j) <> "" THEN
        IF BarManager.ActionObjs.Exists(ButtonIDs(j)) THEN
          Set ActionObj = BarManager.ActionObjs(ButtonIDs(j))
          Call BarManager.ActionObjs.Remove(ButtonIDs(j))
        END IF
        Set ActionObjects(j) = BarManager.ActionObjs.Add(ButtonIDs(j), "CustomButton")
        ActionObjects(j).ToolTip = ButtonNames(j)
        IF Left(ButtonScripts(j), 11) = "BarManager." THEN
          ActionObjects(j).OnClickCode.Code = ButtonScripts(j)
        ELSE
          ActionObjects(j).OnClickCode.Code = "Call ScriptStart(""" & ButtonScripts(j) & """)"
        END IF
        ActionObjects(j).Picture = ButtonIcons(j)
      END IF ' ButtonIDs(j) <> ""
    NEXT ' j
  END IF ' IsArray(ButtonIDs)
AddActionObjects = ActionObjects
End Function ' AddActionObjects()


Function AddButtons(Bar, ButtonIDs, ButtonFlags)
  Dim j, iMax, jMax, Buttons
  Buttons = Array("")
  IF IsArray(ButtonIDs) THEN
    jMax = UBound(ButtonIDs)
    ReDim Buttons(jMax)
    ReDim Preserve ButtonFlags(jMax)
    FOR j = jMax TO 1 Step -1
      IF Bar.UsedActionObjs.Exists(ButtonIDs(j)) THEN
        Call Bar.UsedActionObjs.Remove(ButtonIDs(j))
      END IF
    NEXT ' j
    iMax = Bar.UsedActionObjs.Count
    IF NOT Bar.UsedActionObjs(iMax).ID = "Separator" AND ButtonIDs(0) = "Separator" THEN
      Call Bar.UsedActionObjs.Add("Separator")
    END IF
    FOR j = 1 TO jMax
      IF (ButtonFlags(j)) THEN Call Bar.UsedActionObjs.Add(ButtonIDs(j))
    NEXT ' j
  END IF ' IsArray(ButtonIDs)
AddButtons = Buttons
End Function ' AddButtons()

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

 

0 Kudos
Message 10 of 18
(7,517 Views)