I have a need to be able to rename a logical name if incorrect or name a logical if not present by way of a VBA macro, but can't find any command that allow this without going through a dialog box. Any help or redirection will be appreciated.
scaleflyer said:...can't find any command that allows this without going through a dialog box
It's not clear what you mean by 'dialog box': that could be a MicroStation dialog or a VBA UserForm. How do you want to invoke your macro?
Do you want to execute the renaming with just a key-in and no user interface? Investigate the KeyinArguments Property: Gets or sets a value representing the list of arguments given in the most recent "vba run" keyin command.
Regards, Jon Summers LA Solutions
Hi,
Are you talking about reference files?
ActiveModelReference.Attachments(MyAttachmentNo).LogicalName = "New Name"
ActiveModelReference.Attachments(MyAttachmentNo).Rewrite
where "MyAttachmentNo" is the attachment number.
Often I use
For Each MyAttachment in ActiveModelReference.Attachments
...
Next
--Robert
Answer Verified By: scaleflyer