Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [V8i VBA] Help to improve code to update reference logical names.

$
0
0

[quote user="Jon Summers"]

Take a look at VBA's Like operator.

[/quote]

Thanks that helps some. In my case it wasn't learning how to use the wildcard so much as it was learning where to put the "Not" operator. This alteration seems to work the same and the wildcard makes it a little less code to pick the file or files I want to exclude. 

Sub SetLogNameAsDefLogName()
    Dim att As Attachment
    
    For Each att In ActiveModelReference.Attachments
        If Not att.AttachName Like "*Profile*" Then
           On Error Resume Next
           att.LogicalName = att.DefaultLogicalName
           att.Rewrite
        End If
    Next
End Sub


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>