打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
想把数据库中的中文注释转成模型中的NAME?
DB->PDM,PDM->CDM,都反着干哦。  
  是不是为NAME是英文发愁,而想把数据库中的中文注释转成模型中的NAME?  
  写一段SCRIPT,或许能解决楼顶上两位的问题。  
  在POWERDESIGNER9,选择TOOLS->Execute   Command->Edit/Run   Script,  
  打开窗口后,在里面输入下面的脚本,能把一个PDM中对象的的COMMENT拷给NAME。(我这里只转了TABLE,COLUMN,和VIEW,至于其他的TRIGGER,PROCEDURE自己加进去就可以啦)  
  可以嘛?  
  你们可以打开POWERDESIGNER\VB   Scripts下面的文件看看。  
   
  Option   Explicit  
  ValidationMode   =   True  
  InteractiveMode   =   im_Batch  
   
  Dim   mdl    
   
   
  Set   mdl   =   ActiveModel  
  If   (mdl   Is   Nothing)   Then  
        MsgBox   "There   is   no   current   Model"  
  ElseIf   Not   mdl.IsKindOf(PdPDM.cls_Model)   Then  
        MsgBox   "The   current   model   is   not   an   Physical   Data   model."  
  Else  
        ProcessFolder   mdl  
  End   If   
Private   sub   ProcessFolder(folder)  
        Dim   Tab  
        for   each   Tab   in   folder.tables  
              if   not   tab.isShortcut   then  
                    if   (not   isnull(tab.comment))   and   (trim(tab.comment)<>"")   then  
                          tab.name   =   tab.comment  
                    end   if  
                    Dim   col    
                    for   each   col   in   tab.columns  
                    if   (not   isnull(col.comment))   and     (trim(col.comment)<>"")       then  
                          col.name=   col.comment  
                    end   if  
                    next  
              end   if  
        next  
   
        Dim   view  
        for   each   view   in   folder.Views  
              if   not   view.isShortcut   then  
                    if   (not   isnull(view.comment))   and   (trim(view.comment)<>"")   then  
                          view.name   =   view.comment  
                    end   if  
              end   if  
        next  
   
         
  end   sub   

   
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Power Designer 15 数据库逆向工程
PowerDesiger16与MySQL操作互转
PowerDesigner11学习点滴_骨骨学习笔记
PowerDesigner 创建表格及导出SQL语句
建表 PowerDesigner使用
VB+Access设计图书管理系统
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服