Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations LittleInch on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB API : RemoveObjects( )

  • Thread starter Thread starter Arno
  • Start date Start date
A

Arno

Guest
Hello all,


I realy starting to make good use of the VB API for ProE WF4, but there is one thing i want to use now and i can't seem to get it working.


Usualy after working with files, i use the pfcServer.RemoveObjects() method toremove all files from the workspace i just needed. I then use as argument 'Nothing' so that all files are removed.


Now i have to only delete specific files, but the argument has to be an Object (not a string like Filename). So i kind of figured out it has to be in e StringSequence. This works for 1 filename, but i get the pfcExceptions::ToolKitNotFound error when i 'StringSeq.Append' more filenames in the array.


anyone has an idea how to remove specific number of files from the workspace?





so far:


Dim strS As Istringseq


strS = New Cstringseq


strS.Append(partname)


serv.RemoveObjects(strS)
 
and as usual, once i post something the answer gets to me...


i had to use the Fullname "instancename<genericname>.prt"


when 1 of the names in the stringsequence is wrong, the entire action gets cancelled. so the Stringseq.append works :)
 
Arno,


You can create a list of all files you want to remove and then run a loop to remove each of the from list individually.


HTH
 

Part and Inventory Search

Sponsor

Back
Top