Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
bretrick30
in reply to: Anonymous

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