Fabrication API ContentManager.SaveItemAs doesn't seem to work from CAMduct 2023

JeffYao28
Enthusiast

Fabrication API ContentManager.SaveItemAs doesn't seem to work from CAMduct 2023

JeffYao28
Enthusiast
Enthusiast

 

Dear forum master or anyone else,

 

This is regarding a small add-in I was trying to do in CAMduct 2023 using Fabrication API. Please see the attached MAJ file in the zip. Open the MAJ file in CAMduct and run the C# code snippet below:

 

var item1 = Job.Items[0];
var path1 = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
//path1 += "\\Item1.ITM";
var saveResult = ContentManager.SaveItemAs(item1, path1, "ItemName1", true);

I tried to make path1 as a pure path, or to make it as a full path file name. None of them seem to work. The return message is "Invalid parameters". I also tried to make "ItemName1" the actual name of the item. No luck so far. Can you indicate what I did wrong?

 

Thank you!

 

Jeff Yao

0 Likes
Reply
158 Views
0 Replies
Replies (0)