Message 1 of 4

Not applicable
10-13-2017
12:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this iLogic rule where it will pick up the file name and a custom iProperty per sheet in a drawing pack. However, it will not work on my PC, the code is correct and i think its something within the application on my pc, please help!
Code
SyntaxEditor Code Snippet
Sub Main() 'Purpose: Push file name to sheet name'21-Sept-16 Dim oDoc As Document = ThisApplication.ActiveDocument Dim oSheet As Sheet Dim oDrawingView As DrawingView 'Iterate through sheets For Each oSheet In oDoc.Sheets 'Grab the first drawing view on the sheet oDrawingView = oSheet.DrawingViews(1) 'Grab the model of the first drawing view oModel = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument 'Grab the custom iproperty of the first drawing view model oModel1 = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument.DisplayName o_iProp = iProperties.Value(oModel1, "Custom", "RevisionUK") 'set sheet name to filename and custom iprop from model oSheet.Name = System.IO.Path.GetFileNameWithoutExtension(oModel.FullFileName)& " - " & o_iProp Next End Sub
Error Message
Object reference not set to an instance of an object
Error Message
Solved! Go to Solution.