If not working with a Form. It is likely just in how you are referring to the 'target' document, if any. Also, some built-in iLogic 'tools' tend to work on either the 'local' document, or the 'active' document, depending on the scenario. If you are using the [ iProperties.Value("PropertySetName", "PropertyName") = "a new value" ] call, that is designed to work with whichever document is 'active' at that point in the code where it is used. Most Document objects have an "Activate" method, which will cause the specified document to become 'active'. And there are other methods/actions that will change which document is 'active' too. You may need to either use this Activate method, to ensure the right document is active, or you can just go the longer route of Document.PropertySets.PropertySet.Property.Value = "", instead, while the Document variable used is the one you want to read/write properties from/to.
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)