Forum Discussion
christopher_gillis
8 years agoNew Member
Hello,
It appears that the CADFiles relationship is unique in that it is not a relationship between the CAD and File itemtypes. Rather, it is a null relationship with a file property called "attached_file".
I have updated the sample Method you provided to account for this. Additionally, I have updated your sample to use the newer setFileProperty function that is in 11.0 SP9.
// Create the CAd Document item
var docItem = MyInnovator.newItem("CAD", "add");
docItem.setProperty("item_number", "CADDoc 004");
// Create the relationship between the CAd Document and File
var relItem = MyInnovator.newItem("CADFiles", "add");
relItem.setFileProperty("attached_file", @"C:\Temp\Test.txt");
docItem.addRelationship(relItem);
var results = docItem.apply();
If you are using a version of Innovator before 11.0 SP9, you will need to rewrite this sample to use the attachPhysicalFile function that you were using initially.
Chris
______________________________________
Christopher Gillis
Aras Labs Software Engineer
Former_Member
6 years agoIdeator I
Thank Chris, after Iam using your example, i get error from server: "add access is denied for CAD"
What do you know about my problem?
Thank Chris!
- christopher_gillis6 years agoNew Member
This is really a separate question to the one that was originally asked, so I'll ask that you make a new forum post to ask it. Doing so helps maximize the visibility of your question to our entire community, and it also helps people find the answer if they have the same question in the future.
Thank you.
Chris