본문 바로가기

파워컴퓨팅/컴퓨터활용

ER Studio Entity Name to Clipboard Sample Code

Sub Main
Dim mdl As Model
Dim ent As Entity
Dim attr As AttributeObj
Dim strResult As String

Set mdl = DiagramManager.ActiveDiagram.ActiveModel
Set sm = mdl.ActiveSubModel
strResult =""

For Each ent In mdl.Entities

strResult = strResult &  ent.EntityName & vbCrLf
For Each attr In ent.Attributes
strResult = strResult & vbTab & attr.ColumnName & vbCrLf 'vbTab &" [" & attr.Datatype & "]" & vbCrLf
Next
strResult = strResult &  vbCrLf
    Next

Clipboard strResult
MsgBox "Set Clipboard"
End Sub