Hi, I want to use a global form for any assembly opened at the moment that'll take the parameters inserted in it and create custom properties based on them.
For ex. I press iTrigger or open the global form directly, it opens with empty areas/placeholders to type in my parameters like work order number and once I press apply or done (or a rule button) it saves the values I've entered as custom iProperties into all the components in the assembly.
Solved! Go to Solution.
Solved by A.Acheson. Go to Solution.
Hi @b.tarek
Can you attach your sample code you have worked on? You can do this without code if you save your custom iproperties in the assembly and part template. Then when you open the form on a new document the iprop is allready there and you just input a value.
Here is the rule you need to add to the global form.
Create the rule and add rule button the the form. Thus when applied will take the iproperty specified and send to all iproperties in referenced documents. If your documents don't have the custom iproperty then you will need to add this which is an extra step.
Thank you so much Alan, didn't think of using the custom iProperties in the template file.
I have written the rule for another assembly but was just having problems applying it to all the other assemblies created, this solves it thanks again.
Hi @b.tarek
Great to hear, if it has solved it mark the post as solved so others know what has worked. Or indeed post your finished code and steps required to make it work..
' Get the active document. Dim invDoc As Document = ThisApplication.ActiveDocument ' Get the user defined (custom) property set. Dim invCustomPropertySet As PropertySet = invDoc.PropertySets.Item("Inventor User Defined Properties") ' Create the properties. Dim invProperty As [Property] =
Try
invProperty = invCustomPropertySet.Item("Test")
invProperty.Value = "Test" Catch
invProperty = invCustomPropertySet.Add("Test", "Test Value")
End Try
Can't find what you're looking for? Ask the community or share your knowledge.