Okay I know this seems simple but I have not been able to figure it out. I have read all the fourms and sample codes and have still not made any headway towards a solution. Basically what I have is a code that will read in a variable value from a card (this value has a list of documents [":C\Test\A.sldprt" ":C\Test\B.docx" ":C\Test\C.pdf"]). The code then decomposes the string into a new string, that is the same length as the number of files, and each segment has the file path. I then want to attach the each of those files as a reference to the current parent file. Any ideas????
Imports EdmLib
Module Module1
Sub Main()
'Creates vault, folder, and file objects
Dim vault As IEdmVault15
Dim filename As IEdmFile11
Dim file As IEdmFile11
Dim fileID As Integer
Dim fold As IEdmFolder8
Dim enumvar As IEdmEnumeratorVariable9
Dim COAffectedParts As String
vault = New EdmVault5
'logs into the vault "Test"
vault.LoginAuto("Test", 0)
'sets file equal to the object with the path typed in and sets folder to the parent folder object of the file
filename = vault.GetFileFromPath("C:\Test\Test\RelayMount.sldprt", fold)
Dim _COAffectedParts As String
fileID = filename.ID
enumvar = filename.GetEnumeratorVariable
If enumvar.GetVar("CO Affected Parts", "@", _COAffectedParts) Then
COAffectedParts = _COAffectedParts.ToString
End If
Dim COAffectedParts1 As String = Replace(COAffectedParts, """", "")
Dim COAffectedParts2() As String = Split(COAffectedParts1)
End Sub
End Module
SolidworksApi macros