If this is the entire rule, then I assume it is a local iLogic rule and that "SEAL_CUSTOM_EXTENTS" is the name of a local Parameter. If so, that Parameter would need to exist within the Assembly.
Or if that parameter only exists within the target part, you would have to access its similarly to this:
If Parameter.Value(oTargetDoc.DisplayName,"SEAL_CUSTOM_EXTENTS") = "REQUIRED" Then
for it to work.
When using the iProperties.Value() route to access the iProperties, and you are not specifying a component name or a document name as the first input variable, you are accessing the iProperties of the document which contains this rule. To access the iProperties of the target part file, you would either need to specify that part documents name as the first input variable (similarly to how I am doing in the Parameter call above, or you will have to access its iProperties the long way and dig down through the part document object, PropertySets, PropertySet, Property, Value.
Here is an alternative rule that you might use if accessing the parts parameters and iProperties from the assembly:
(You will need to create a variable for the target part document, and set its value somehow, which is what this first line is attempting to do, first.)
Dim oTargetPart As PartDocument = ThisApplication.Documents.Open("C:\Temp\Part.ipt", False)
If Parameter.Value(oTargetPart.DisplayName,"SEAL_CUSTOM_EXTENTS") = "REQUIRED" Then
iProperties.Value(oTargetPart.DisplayName, "Project", "Part Number") = "N/A"
'or
'oTargetPart.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value = "N/A"
iProperties.Value(oTargetPart.DisplayName, "Summary", "Keywords") = "RTSM"
'or
'oTargetPart.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value = "RTSM"
Else
iProperties.Value(oTargetPart.DisplayName, "Summary", "Keywords") = "N/A"
'or
'oTargetPart.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value = "N/A"
ThisApplication.ActiveDocument.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"
End If
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.
If you have time, please... Vote For My IDEAS 💡and Explore My CONTRIBUTIONS
Inventor 2021 Help | Inventor Forum | Inventor Customization Forum | Inventor Ideas Forum
Wesley Crihfield

(Not an Autodesk Employee)