How to change filename? PutFileName fails!

[ Edited ]


I have been trying to change a filename using the PutFileName method; however, it throws a com exceptions and says it is read only.  Can anyone please explain how I should be doing this?  I know it is possible because Jason's solid edge spy will change the filename if you type it in there.  Perhaps if someone can tell me how the solid edge spy does it?  




 for(long i=0;iGetCount();i++)



      copy->FileName = (_bstr_t) new_filename.c_str();

     //the above statement throws a com error stating read only property?

}      CopiedPartPtr copy = design_copies->Item(i+1L);I have also tried PutFileName in place of the above code.


Posted by: Derek Rollinson
Post date: 5/6/2010 11:48:20 AM