I was wondering how I can get the fileName of the attachment that is being deleted when intercepting the op.attachments.delete operation?
Thanks
Simon
Get fileName on op.attachments.delete
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Get fileName on op.attachments.delete
Hello Simon,
You can acquire the Attachments List from the operation's options:
https://sdkhelp.pdf-xchange.com/vi ... nts_delete
Then you can get IPXC_FileSpec from the list and it has all of the properties that you need, for example IPXC_FileSpec::FileName
Cheers,
Alex
You can acquire the Attachments List from the operation's options:
https://sdkhelp.pdf-xchange.com/vi ... nts_delete
Then you can get IPXC_FileSpec from the list and it has all of the properties that you need, for example IPXC_FileSpec::FileName
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Get fileName on op.attachments.delete
Alex,
Thank you for your help, however this returns the list of all attachments and not the attachment that is actually being deleted. I am intercepting the op.attachments.delete event, however I can't seem to get the information on the file that is actually being deleted?
Thanks
Simon
Thank you for your help, however this returns the list of all attachments and not the attachment that is actually being deleted. I am intercepting the op.attachments.delete event, however I can't seem to get the information on the file that is actually being deleted?
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Get fileName on op.attachments.delete
Hello Simon,
Please give a code piece that you are using to do this.
Cheers,
Alex
Please give a code piece that you are using to do this.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Get fileName on op.attachments.delete
Alex,
Please see code below. I know what the issue is that I am looping through the current attachment list, however I need to determine the actual attachment that is being deleted, however I am unsure how to do this?
Thanks
Simon
Please see code below. I know what the issue is that I am looping through the current attachment list, however I need to determine the actual attachment that is being deleted, however I am unsure how to do this?
Code: Select all
Private Sub docPreview_OnEvent(sender As Object, e As AxPDFXEdit._IPXV_ControlEvents_OnEventEvent) Handles docPreview.OnEvent
If e.nEventID = nIDS(CInt(IDS.e_operExecuted)) Then
Try
If oper.ID = Me.docPreview.Inst.Str2ID("op.attachments.delete", False) Then
Dim Tree As PDFXEdit.IPXC_NameTree = Me.docPreview.Doc.CoreDoc.GetNameTree("EmbeddedFiles")
Dim nAttachmentsCount As UInteger = Tree.Count
Dim sName As String
For i As UInteger = 0 To nAttachmentsCount - 1
Dim pValue As PDFXEdit.IPXS_PDFVariant
Tree.Item(i, sName, pValue)
Dim FS As PDFXEdit.IPXC_FileSpec = Me.docPreview.Doc.CoreDoc.GetFileSpecFromVariant(pValue)
Next
End If
Catch ex As Exception
MsgBox(ex.message)
End Try
End If
End Sub
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Get fileName on op.attachments.delete
Hello Simon,
Please read my previous post carefully.
Cheers,
Alex
Please read my previous post carefully.
https://sdkhelp.pdf-xchange.com/vi ... te_OptionsSasha - Tracker Dev Team wrote: You can acquire the Attachments List from the operation's options:
https://sdkhelp.pdf-xchange.com/vi ... nts_delete
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ