﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-lvbuwei</title><link>http://www.cnitblog.com/lvbuwei/</link><description>Python,Delphi,Linux</description><language>zh-cn</language><lastBuildDate>Mon, 04 May 2026 22:22:30 GMT</lastBuildDate><pubDate>Mon, 04 May 2026 22:22:30 GMT</pubDate><ttl>60</ttl><item><title>在Powerdesigner中,根据已有字段的Name值替换Code相同的Name的值</title><link>http://www.cnitblog.com/lvbuwei/archive/2006/08/19/15584.html</link><dc:creator>吕不为</dc:creator><author>吕不为</author><pubDate>Sat, 19 Aug 2006 09:13:00 GMT</pubDate><guid>http://www.cnitblog.com/lvbuwei/archive/2006/08/19/15584.html</guid><wfw:comment>http://www.cnitblog.com/lvbuwei/comments/15584.html</wfw:comment><comments>http://www.cnitblog.com/lvbuwei/archive/2006/08/19/15584.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/lvbuwei/comments/commentRss/15584.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/lvbuwei/services/trackbacks/15584.html</trackback:ping><description><![CDATA[如果在powerdesigner中有一个表我已经把名子和你码对应好了.<br />比如Name是年,Code是year,那么怎么把别的表中的Code是Year的Name设成年呢? <br />用以下代码即可,哈哈.调好了.<br /><br />Dim nb<br />nb=ActiveSelection.Count<br />if nb=0 then<br />Output "No selected Objects"<br />end if<br />dim obj<br />Dim d                   '创建一个变量  and (not d.Exists(col.Code)) <br />Set d = CreateObject("Scripting.Dictionary")<br />for Each obj in ActiveSelection<br />  for each col in obj.Columns<br />    if (col.Code&lt;&gt;col.Name) and (not d.Exists(col.Code))then<br />    Output "--"+obj.Name+"."+obj.Code+"="+col.Name+"."+col.Code<br />      d.Add col.Code,col.Name<br />     end if<br />  next<br />next<br />for Each obj in ActiveSelection<br />  for each col in obj.Columns  <br />    if (col.Code=col.Name) and (d.Exists(col.Code) )then<br />     Output col.Name+"."+col.Code+"."+d.Item(col.Code)<br />      col.Name=d.Item(col.Code)<br />     end if<br />  next<br />next<br /><br /><img src ="http://www.cnitblog.com/lvbuwei/aggbug/15584.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/lvbuwei/" target="_blank">吕不为</a> 2006-08-19 17:13 <a href="http://www.cnitblog.com/lvbuwei/archive/2006/08/19/15584.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>