Ilogic & Content Center

Ilogic & Content Center

JamieSENG
Advocate Advocate
1,040 Views
4 Replies
Message 1 of 5

Ilogic & Content Center

JamieSENG
Advocate
Advocate
Hi Guys,

I'm having some trouble using an illogic form that I found and edited to suit my needs. What I've made is an iproperty check form that's triggered on save. I've set it in both sheet/part ipt and both std/weld iam templates and they seem to work as intended. But my problems begins when I created a part from the content center. First off I've read that I'd need to switch the family template for the generated parts to have the form but the content center is a shared one stored in the vault server. Ideally don't want to mess around with this because my next job is restructure the whole vault so I'm looking for an alternative method. Also I do believe there is some chance that it may be deleted or more accurately overwritten by the original template at some stage or so I've read.

I did attempt with little success to switch the template by getting a part, saving it away from inventor, adding the form but editing it to trigger after save due to content center insisting the file is saved before its placed. Multiple attempts to get it back in failed but the trouble is besides it not allowing me to put it back we use a large custom content center which wasn't set up by me and I don't fancy being the one that ruins it.

I'm now at the stage that I see were I want to go with it but not sure how to deal with it.

Now my thought is to make a global form and set conditions per file format. For ipt's I have the iprop check that part num, description, keywords, category and custom property 'paper size' (which isn't ideal because the part is made before the drawing but I've improvised) are filled and for iam's the above minus keywords. These are set to trigger on save were as the part from the content center would have the same checks as the ipt templates but be saved before so it would need to be set to trigger after save and this would need its own form to apply to a trigger I believe? My main concern is getting a way for content center files to pick up on the form whether separate or combined.

Would all this be possible in one code with conditions or would there be issues due to each part having a different format, varying iproperties and different triggers? Another thought is would a global form effect drawing templates, library parts or iparts? Or anything other than the part intended.

I did think to add a check on the drawing it would be some use in making sure it's accurate. But it isn't an iprop I'd check its the fields in the drawing template. I'd have it check they were filled so to check that the material dims match those of the drawing. (Finding way to many drawings completely off dimension) and part num, description etc. another thing maybe one you guys no is would there be a way a forcing a part to open when to apply a iproperty when the drawing is saved. It could be a way of making more sense of the paper size instead of having to assume before hand.

I did have an external rule that had to be clicked. It sent a copy of a drawing (autocad format) and pdf to a designated folder. I'd had nothing but problems with it giving me form errors all the time even though it was working fine. I got fed up in the end and deleted it because I spent the same time clicking ok as it would have converting the drawings individually. My point is does anyone have experience of illogic doing just what you wanted it to do but having glitches, bugs and errors all the time. It was something I found occurred more in assemblies. So could I potentially have a similar experience with what I'm after.

Of course if I've completely overlooked an easier alternative I'd love to hear it. Any help in the right direction will be greatly appreciated anyway.

Thanks in advanced
0 Likes
1,041 Views
4 Replies
Replies (4)
Message 2 of 5

JamieSENG
Advocate
Advocate
iProperty Check – Created Parts

Keywords = iProperties.Value("Summary", "Keywords")
PaperSize = iProperties.Value("Custom", "Paper Size")
Desc = iProperties.Value("Project", "Description")
PartNumber = iProperties.Value("Project", "Part Number")
Category = iProperties.Value("Summary", "Category")

Do Until String.IsNullOrWhiteSpace(Keywords) = False And String.IsNullOrWhiteSpace(PaperSize) = False And 
String.IsNullOrWhiteSpace(Desc) = False And String.IsNullOrWhiteSpace(PartNumber) = False And String.IsNullOrWhiteSpace(Category) = False
iLogicForm.Show("iProperty Check", FormMode.Modal)
Keywords = iProperties.Value("Summary", "Keywords")
PaperSize = iProperties.Value("Custom", "Paper Size")
Desc = iProperties.Value("Project", "Description")
PartNumber = iProperties.Value("Project", "Part Number")
Category = iProperties.Value("Summary", "Category")
Loop

iProperty Check - Assemblies

PaperSize = iProperties.Value("Custom", "Paper Size")
Desc = iProperties.Value("Project", "Description")
PartNumber = iProperties.Value("Project", "Part Number")
Category = iProperties.Value("Summary", "Category")

Do Until String.IsNullOrWhiteSpace(PaperSize) = False And 
String.IsNullOrWhiteSpace(Desc) = False And String.IsNullOrWhiteSpace(PartNumber) = False And String.IsNullOrWhiteSpace(Category) = False
iLogicForm.Show("iProperty Check assy", FormMode.Modal)
PaperSize = iProperties.Value("Custom", "Paper Size")
Desc = iProperties.Value("Project", "Description")
PartNumber = iProperties.Value("Project", "Part Number")
Category = iProperties.Value("Summary", "Category")
Loop

 

0 Likes
Message 3 of 5

adam.nagy
Autodesk Support
Autodesk Support

Hi Jamie,

 

If you want to have something generic and not pollute your documents, then I think the best would be to create an AddIn that is handling the OnSave event and does what it needs to do there.

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 4 of 5

JamieSENG
Advocate
Advocate

I assume your talking about an external rule. If so i get your point it would solve the issue, its just im trying to make a solution that's specific to are needs (both parts and assemblies) both inside and outside of cad (boms etc). I actually want it to pollute it which sounds daft but if its going drive us mad so much that we fill the properties out before saving then it does its job.

 

Well since i first posted this ive kind off come to a resolve while Ive also kind of gone a bit mad using ilogic for all sorts of other stuff...ha ha

 

Ive since embedded the code specifically to each template so it prompts us to fill the required properties. Ive also additionally added another code which will question us after saving if a drawing is required. For are needs and the areas that we are trying to improve this should help out.

 

In the attached .ipt notice the custom iprops and the parameters under manage. Im just in the process in linking those up. These properties will all transfer between the bom details and the drawings while the sheet size may be removed if i can figure out how to have the drawing send it over. The reasons behind the sheet size is to save on printing errors by not guesstimating the size through the thumbnail haha.

 

Ive kind of gone off track to my real point which was getting these details embedded into the family template of the content centre parts so if you have any ideas based around what ive done in my example and briefed on what it is im looking for the help would be hugely appreciated.. Also any comments on the solution im attempting will go a long way. Thanks.

0 Likes
Message 5 of 5

adam.nagy
Autodesk Support
Autodesk Support

Hi Jamie,

 

No, I meant an actual add-in which provides access to all the Inventor functionality that iLogic itself is built on top.

That way you can modify functionality without having to update the iLogic code in any of the documents. And you have access to many more events, plus can even cancel the save of the file if something is not filled in properly, etc.

 

But most of the Inventor API can be used directly from a Rule as well, so if that's the way you want to do things, that's fine too 🙂

 

Cheers,

 

 



Adam Nagy
Autodesk Platform Services
0 Likes