I am trying to adopt a blank assembly into my design and it will not allow me to adopt in the parameters. Why? It will allow me to adopt the parameters if i adopt it as an ilogic assembly, but I want the assembly to be recreated new like the rest of my parts. I know I can use a template assembly, but that will not allow me access to the parameters of that file. Any thoughts?
I can better explain what I'm trying to do. We use custom iproperties on our drawing packages and one of those custom iproperties is called "Material". I'm having trouble writing to this custom iproperty because there is a physical iproperty also called "Material". My work around with my parts was to create a text parameter called "Material" and then use a ilogic rule to transfer the information from parameter to custom iproperty.
To add to the complexity, I did not adopt a inital assembly. I created everything manually through my ETO code.
I can create my parameter in a templatefile ( templateFile = ModelLocation()+"\Template.iam" ), but I can't write to the parameters of the templateFile. I've been trying to adopt my templateFile (which is has no .ipt files but does have parameters) so I can write to the parameters. But when I try to adopt the assembly, it won't allow me to adopt the parameters.
Does anyone know of a way to write directally to the parameters without adopting them? Or what I'm doing wrong in adopting my template file?
Attached is a link to my screen shots to help explain my problem.
https://www.dropbox.com/s/ja3xvx5x9wddq0q/Adopt_Assy_Param.zip
Hi,
You have at least two options to update iProperties of your drawing:
1. Use Inventor API. The simplest is GetHostObject(drawing) that returns the Inventor reference for the DrawingDocument.
2. Invoke iLogic Rule directly from Intent code via iv_RuniLogicRule( drawing, "Rule1").
Can't find what you're looking for? Ask the community or share your knowledge.