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

I made a small update to my code to get around an error caused by no model name being displayed when reference display is turned off. For anyone that stumbles on this and wants to use it. 

Sub SetLogNameAsDefLogName()
    Dim att As Attachment
     
    For Each att In ActiveModelReference.Attachments
        If att.AttachName <> "303881-Water-Profile.dgn" 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>