- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
To save time I want to set my sheet names to display as: "drawing iproperty (company)"-"model iproperty (part number)".
Example: The drawing iproperty under company is set as "CoolCompany". The model part number of the first drawing in the first sheet is set as "L0201". After running an iLogic rule, the first sheet name would read out as: CoolCompany-L0201
While looking through this forum, I found part of the solution as follows:
SyntaxEditor Code Snippet
Sub Main If TypeOf ThisDoc.Document Is DrawingDocument Then Dim dwgDoc As DrawingDocument = ThisDoc.Document For Each dwgSheet As Sheet In dwgDoc.Sheets If dwgSheet.DrawingViews.Count > 0 Then modelFile = dwgSheet.DrawingViews(1).ReferencedDocumentDescriptor.FullDocumentName modelDoc = dwgSheet.DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument prtNumber = modelDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").ItemByPropId(5).Value If Not String.IsNullOrEmpty(prtNumber) Then dwgSheet.Name = prtNumber End If End If Next End If End Sub
This however, only grabs the iproperty from the model. It lacks the drawing iproperty I would like to include. I tried mixing and matching various solutions on this forum, but my programming knowledge is abysmal. I couldn't find a solution. Can anyone help fill in the missing code?
Thanks in advance,
Tom
P.S.: great forum and great contributors. It helped me a ton so far.
Solved! Go to Solution.