Hello,
I am new to Solidworks API and have a question I was hoping to get answered.
I am trying to validate the extensions of files being added to the vault, from the PreAdd Hook.
I loop through the ppoData array and check each file extension against a SQL Database Table that stores valid extensions and returns True or False. This is working well and I have no issues here. If any invalid extensions are detected, it will alert the user if they want to cancel the entire operation, or just add the valid files. If they select Cancel, I can use poCmd.mbCancel = True to cancel the operation. This is where I am having trouble - If they select to commit only the valid files, I need to add only the valid files. How do I remove the invalid files from the array of files being added?
I've tried adding the valid files to a List of Type EdmCmdData and only adding those files, but that doesn't seem to work.
I am using Visual Studio 2013 with VB.Net with Solidworks 2016 and EPDM 2016.
Any help would be appreciated.
Thank you.
SolidworksApi macros