08-19-2015
08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-19-2015
08:04 AM
I have an iLogic rule that kind of does what you are looking for.
This rule looks through my .idw sheets and finds the part/assembly I am looking for based off of the part number, in this example it is looking for an assembly that has a part number that begins with MF, MR, MS, MV, AR, AA, AW, AX, or AD. What it is doing is changing the Designer of the model to match the current user. Sometimes we have someone create the models and someone else create the drawings.
SyntaxEditor Code Snippet
oDoc = ThisDoc.Document Dim oSheet As Sheet Dim oSheets As Sheets oSheets = oDoc.Sheets Dim PNumCheck As String For Each oSheet In oSheets Try RefDocProps = oSheet.DrawingViews.Item(1).ReferencedFile.DocumentDescriptor.ReferencedDocument.PropertySets PNumCheck = RefDocProps.Item("Design Tracking Properties").Item("Part Number").Expression Select Case Left(PNumCheck,2) Case "MF","MR","MS","MV","AR","AA","AW","AX","AD" RefDocProps.Item("Design Tracking Properties").Item("Designer").Expression = ThisApplication.Username End Select Catch MessageBox.Show("Error: Finding assembly and overriding Designer." & vbNewLine & vbNewLine & oSheet.Name) End Try Next