惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - NetSQL

测试标准1 javaScript数据类型与typeof操作符 写出几种IE6 BUG的解决方法 Axure使用笔记1:如何去除IE中每次“已限制网页运行脚本或ActiveX控件” IIS7 经典模式和集成模式的区别 源代码管理:SVN源代码管理器在ASP.NET VS中的使用注意事项 Android开发常用的一些功能列表 js获取下拉框的选中值和文本值,后台获取用Request["XXXX"]即可 省市区数据库下载,包含34个省级,340个市级,2865个县级 juqery.validate 在IE下失效的问题,无法进行提交验证 各大电子商务网站的站内搜索比较,因为要做站内搜索,所以前去观摩下 项目开发和管理需要弄清楚的6个问题 做自己网站的访问记录系统,用于推广统计 Powerdesigner中如何生成测试数据 如何进行数据库,比如ORACLE,SQL SERVER的逆向工程,将数据库导入到PowerDesigner中 oracle创建表空间 PowerDesigner中如何生成主键和自增列--Oracle版本 PowerDesigner建立与数据库的连接,以便生成数据库和从数据库生成到PD中。[Oracle 10G版] PowerDesigner中如何生成主键和自增列--SQL SERVER版本
PowerDesigner中NAME和COMMENT的互相转换,需要执行语句
NetSQL · 2010-05-24 · via 博客园 - NetSQL

使用说明: 在【Tools】-【Execute Commands】-【Edit/Run Script】 下。输入下面你要选择的语句即可,也可以保存起来,以便下次使用,后缀为.vbs。

 需要注意的问题是:运行语句时必须在Module模式下,如果是导出报表时执行会出现错误提示。

1.Name转到Comment注释字段。一般情况下只填写NAME,COMMENT可以运行语句自动生成。

将该语句保存为name2comment.vbs

代码

'把pd中那么name想自动添加到comment里面
'如果comment为空,则填入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   comment   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 
          if  trim(tab.comment)="" then
'如果有表的注释,则不改变它.如果没有表注释.则把name添加到注释里面.   
                    tab.comment   
=   tab.name   
          
end if  
                  Dim   col   
'   running   column    
                  for   each   col   in   tab.columns   
                        if trim(col.comment)="" then 
'如果col的comment为空,则填入name,如果已有注释,则不添加;这样可以避免已有注释丢失.
                           col.comment
=   col.name   
                        
end if 
                  
next    
            
end   if    
      
next    
  
      Dim   
view   'running   view    
      for   each   view   in   folder.Views    
            if   not   view.isShortcut and trim(view.comment)=""  then    
                  view.comment   =   view.name    
            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   sub  

2.将Comment内容保存到NAME中,comment2name.vbs 实习互换。语句为:

代码

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    
  
Private   sub   ProcessFolder(folder)    
On Error Resume Next   
      Dim   Tab   
'running     table    
      for   each   Tab   in   folder.tables    
            if   not   tab.isShortcut   then    
                  tab.name   =   tab.comment   
                  Dim   col   
'   running   column    
                  
for   each   col   in   tab.columns    
                  
if col.comment="" then   
                  
else  
                        col.name
=   col.comment    
                  
end if  
                  
next    
            
end   if    
      
next    
  
      Dim   
view   'running   view    
      for   each   view   in   folder.Views    
            if   not   view.isShortcut   then    
                  view.name   =   view.comment    
            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   sub