请问POWERDESIGN9.5中反向工程能否自定义模板

请问POWERDESIGN9.5中反向工程能否自定义模板

楼主niat97222(Freeman)2006-09-16 16:22:53 在 软件工程/管理 / Power Designer 提问

PD9.5中,希望能够自己配置从某个字段读取数据,比如,希望将SQL   SERVER中的字段描述读入PD中做为NAME,请问是否有地方能配置此种信息 问题点数:100、回复次数:5Top

1 楼niat97222(Freeman)回复于 2006-09-18 09:18:24 得分 0

晕  
  无人响应???Top

2 楼niat97222(Freeman)回复于 2006-09-22 11:34:58 得分 0

还是没人吗  
  结贴都无法结贴啊Top

3 楼shuiniu(飞扬的梦)(我是一头只吃西红柿的水牛)回复于 2006-09-22 13:51:50 得分 100

无此配置  
   
  可以写个vbs   将column.comment   赋给column.name  
   
  参考:  
  Option   Explicit  
  ValidationMode   =   True  
  InteractiveMode   =   im_Batch  
   
  Dim   mdl   '   the   current   model  
   
  '   get   the   current   active   model  
  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  
   
  '   This   routine   copy   name   into   code   for   each   table,   each   column   and   each   view  
  '   of   the   current   folder  
  Private   sub   ProcessFolder(folder)  
        Dim   Tab   'running     table  
        for   each   Tab   in   folder.tables  
              if   not   tab.isShortcut   then  
                    Dim   col   '   running   column  
                    for   each   col   in   tab.columns  
                                  col.name   =   col.comment    
                                  'col.name   =   col.code  
                    next  
              end   if  
        next  
   
        '   go   into   the   sub-packages  
        Dim   f   '   running   folder  
        For   Each   f   In   folder.Packages  
              if   not   f.IsShortcut   then  
                    ProcessFolder   f  
              end   if  
        Next  
  end   subTop

4 楼shuiniu(飞扬的梦)(我是一头只吃西红柿的水牛)回复于 2006-09-22 13:54:36 得分 0

pd11:  
  Tools   ->Execute   Commands->Edit/Run   Script...  
   
  执行以上脚本即可!Top

5 楼niat97222(Freeman)回复于 2006-09-28 19:16:35 得分 0

虽然你理解错了我的意思  
  但是还是很感谢你的回复

Tags(标签):请问P

文章评论
 专题推荐
     栏目更新
    站点导航

    天天网摘 Copyright(版权所有) © 天天网摘 2001~2009

    本站文章来源于网络,如果有侵犯你的权宜的地方,请指出我们会即时更正。

    Free Web Hosting