Is there a way to add a prefix to each level name in 500 dgns without having to open each file?
Unknown said: Is there a way to add a prefix to each level name in 500 dgns without having to open each file?
Tricky....
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me
Unknown said:I'm assuming ...
Wrong assumption!
Unknown said:Can be done through VBA
Leonard posted VBA code, not BASIC. BASIC is deprecated (and doesn't exist in MicroStation CONNECT). For reasons that are lost in the mists of time, MicroStation's Utilities menu does not make clear the distinction between VBA and BASIC.
Use Utilities|Macro|Visual Basic Editor or Utilities|Macro|Project Manager to get at VBA tools.
Regards, Jon Summers LA Solutions
I'm assuming that all I need to do is copy and paste the snippet into the BASIC editor?Unfortunately it's not working
Rod WingSenior Systems Analyst
Can be done through VBA. Following is a sample code. Test it before using on actual files. Have a backup of original files.
Public Sub RenameLevels() Dim oLevel As Level For Each oLevel In ActiveDesignFile.Levels Debug.Print oLevel.Name If oLevel.IsFromLevelLibrary = False And oLevel.Name <> "Default" Then oLevel.Name = "XYZ_" & oLevel.Name ActiveDesignFile.Levels.Rewrite End If Next oLevel End Sub
Regards,Leonard Jones.