Page 1 of 1

Help needed with conversion to Ribbon UI

Posted: Wed Apr 24, 2019 3:06 pm
by prime clinical systems
Hi this code works fine still in V8 to popup the cmd.document.signatures.placesign with classic mode, but throws error in ribbon mode, not sure how to find this now as I moved it to the Home Tab:

Dim cmdBar As PDFXEditCtl.IUIX_CmdBar
Dim nFlatIndex As Long
Dim cmdDoc As PDFXEditCtl.IUIX_CmdItem
Set cmdBar = Me.PDF.Inst.ActiveMainFrm.View.MenuBar
nFlatIndex = cmdBar.FlatFindFirstItemByCmdName("cmd.document") : this fails now

Set cmdDoc = cmdBar.FlatGetItem(nFlatIndex)
Dim cmdDocMenu As PDFXEditCtl.IUIX_CmdMenu
Set cmdDocMenu = cmdDoc.SubMenu
Dim nMenuIndex As Long
nMenuIndex = cmdDocMenu.FindFirstItemByCmdName("cmd.document.signatures.placesign")
Dim cmdSigSubMenu As PDFXEditCtl.IUIX_CmdMenu
If nMenuIndex = -1 Then
Exit Sub
End If
Set cmdSigSubMenu = cmdDocMenu.Item(nMenuIndex)
Dim IUIXobj As PDFXEditCtl.IUIX_Obj
Set IUIXobj = Me.PDF.Inst.ActiveMainView.Obj
Dim pPos As PDFXEditCtl.tagRECT
pPos.left = 200
pPos.bottom = 200
Call Me.p_uiInst.CmdManager.ShowPopupMenu(IUIXobj, cmdSigSubMenu, pPos)

Tried this but does not work:
Call Me.p_uiInst.CmdManager.ExecCmd(Me.PDF.Inst.Str2ID("cmd.document.signatures.placesign"))

Thanks.

Re: Help needed with conversion to Ribbon UI

Posted: Thu Apr 25, 2019 12:15 pm
by Sasha - Tracker Dev Team
Hello prime clinical systems,

Try using the cmd.document.signatures.sign command.

Cheers,
Alex

Re: Help needed with conversion to Ribbon UI

Posted: Thu Apr 25, 2019 2:37 pm
by prime clinical systems
Hi Alex, this command is for placing a digital signature.. I want to call the Signatures and Initials popup, as before, just not sure where to start the search since the document menu does not exist in Ribbon UI. Thanks

Re: Help needed with conversion to Ribbon UI  SOLVED

Posted: Sat Apr 27, 2019 3:13 pm
by prime clinical systems
You can ignore this now, I solved by moving the signatures and initials to the main command bar, so no longer need to pop it up.

Re: Help needed with conversion to Ribbon UI

Posted: Mon Apr 29, 2019 7:19 am
by Sasha - Tracker Dev Team
Hello prime clinical systems,

Glad you had it solved.

Cheers,
Alex