Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: claudio.ibarra

Hi @claudio.ibarra.  I'm on my way out for the day, but yes, it would still be OK to use the 'ThisDoc.Document' term in an external rule.  It is a dynamic phrase, and acts differently in different situations (with very little public documentation about how it works differently in those different situations though).  If the external rule is triggered to run by an event on the 'This Document' tab of the Event Triggers dialog, then the 'ThisDoc.Document' phrase should be pointing to that document that the event was fired from.  Otherwise, it would normally point to whichever document was 'active' when the rule first started, when used in an external rule, with no other special circumstances.  I would be tempted to use the 'iLogicVb.Automation.GetNamedEntities()' method though in an external rule, instead of 'ThisDoc.NamedEntities', and use the Document returned by that 'ThisDoc.Document' phrase as input.  Maybe not necessary though.

Yes, you could definitely iterate through all objects within the 'NamedEntities' collection, but it may be a bit odd, because NamedEntities.Entities is a NameValueMap.  You could effectively use 'For Each', but you may be able to use 'For i As Integer = 1 To oMap.Count' type of loop starter.  Obviously the Name would be a String, but the Value is just a generic Object, so you would need to check the Type of each Value to know how to handle it.  Once you know its Type, you can declare a variable of that Type, and set the Value as its value, then work from there within the loop.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)