- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
OK. So you currently have an assembly open on your screen, and you know that there is a drawing for that assembly, and you want to access the iProperties of that drawing from that assembly, without opening that drawing, right? Well, from an iLogic rule, you can only access the iProperties of an open drawing. The drawing does not necessarily need to be 'visibly' open, but it does need to be open. You can specify False as the last input when using that Documents.Open method, and the document will be opened invisibly (in the background, no document tab shown).
Or, if the drawing is already open, but is simply not the 'active' document, you can get a reference to it through the ThisApplication.Documents collection using the Documents.ItemByName() property, where it will let you specify the FullDocumentName of the drawing.
Either way, once you have the Document (or DrawingDocument) object, you can use its Document.PropertySets, then PropertySets.Item property to access a specific PropertySet, then use the PropertySet.Item property to get a specific Property object, then Property.Value to access its value. Unfortunately, you would not be able to use the iLogic snippet iProperties.Value("SetName", "PropertyName") route, because even if you specified the first (of 3) inputs in an attempt to specify a document, it can only access a document that is within the scope of the active documents 'AllReferencedDocuments' collection...and the drawing will not be in that collection.
Wesley Crihfield
(Not an Autodesk Employee)