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

推荐订阅源

N
News and Events Feed by Topic
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Jina AI
Jina AI
H
Help Net Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
L
LangChain Blog
Recorded Future
Recorded Future
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
GbyAI
GbyAI
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
M
MIT News - Artificial intelligence
爱范儿
爱范儿
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
B
Blog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
The Cloudflare Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
D
DataBreaches.Net
博客园 - 【当耐特】
T
Troy Hunt's Blog
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog

博客园 - JJ.Net

正在还原 with(nolock) for xml path 某个sql帖子的答题 JQuery hide JQuery tr 循环,删除td JQuery Disabled QueryString大小设置 Silverlight HelloWorld List自增Identity列 MVC控制器跳转 JQuery选择器倒数 最后一行所有td加粗 Linq之OrderBy 循环初始化主从表数据 JQuery之Trim List<T>根据条件直接修改 JQuery选择器之has Sqlserver模拟Sequence
PowerDesign Comment显示
JJ.Net · 2015-12-25 · via 博客园 - JJ.Net

代码一:将Name中的字符COPY至Comment中

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
                  tab.comment   =   tab.name
                  Dim   col   '   running   column
                  for   each   col   in   tab.columns
                        col.comment=   col.name
                  next
            end   if
      next

      Dim   view   'running   view
      for   each   view   in   folder.Views
            if   not   view.isShortcut   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

--------------------------------------------

         另外在使用REVERSE ENGINEER从数据库反向生成PDM的时候,PDM中的表的NAME和CODE事实上都是CODE,为了把NAME替换为数据库中Table或Column的中文Comment,可以使用以下脚本:

    • 代码二:将Comment中的字符COPY至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

      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

    • -----------------------------------------------------------------------

      以上两段代码都是VB脚本,在PowerDesigner中使用方法为:

          PowerDesigner->Tools->Execute Commands->Edit/Run Scripts

      将代码Copy进去执行就可以了,是对整个CDM或PDM进行操作

    • 原文地址:http://www.cnblogs.com/wuyifu/archive/2013/01/11/2855705.html