Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

iProperties in External Rules

D.Wheeler3GADA
Advocate

iProperties in External Rules

D.Wheeler3GADA
Advocate
Advocate

I am trying to write code that accomplishes the following:

 

While running an external rule in an assembly that sizes an assembly (a different assy the external rule references) for insertion into the open assembly, is there a way to populate the iProperty "Project" value in the assembly being inserted with the  iProperty "Project" value of the assembly it is being inserted into?

 

The caveat here is that I need the command to be part of the External Rule, so I can't code with the filename of the assembly the object is being inserted into. (Because it could be any assembly...)

 

In other words, the code would need to read the project number from the assembly running the External rule for placement into a variable of that rule.

 

Hope that makes sense. Any ideas are welcome!

0 Likes
Reply
205 Views
1 Reply
Reply (1)

MateriaGris
Contributor
Contributor

Hi @D.Wheeler3GADA 


I don't know if that's exactly what you want to achieve, but the following code can be in an external rule and running it from an assembly copies the "Project" property to the assembly it opens.

 

oProject=iProperties.Value("Project", "Project")


Dim Docu As AssemblyDocument = ThisApplication.Documents.Open("Paste Full document name as string", True)

Dim invDesignInfo As PropertySet
invDesignInfo = Docu.PropertySets.Item("Design Tracking Properties")   
        
invDesignInfo.Item("Project").Value = oProject

I hope you find it useful.

0 Likes