为物理数据图中的表列添加注释 [英] Add a comments for tables columns in a physical data diagram

查看:107
本文介绍了为物理数据图中的表列添加注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过双击表并选择列"选项卡来查看我的列注释. 但是,当我选择显示首选项"->表"->高级..."->列"->列表列" [选择]时,我找不到该属性注释".

I can see my column comments through double-clicking on table and selecting a Columns tab. But when I choose Display Preferenses-> Table-> Advanced...-> Columns-> List Columns [select] - I cant't find this attribute "Comment" there.

是否可以从模型中添加要在物理图"中显示的属性ColumnComment?如何实现?

Is it possible to add the attribute ColumnComment from the model to be shown in Physical Diagram, and how?

推荐答案

您不能直接添加它,因为它们是rtf文本而不是简单的字符串,
因此未列出此类属性.

You can't add it directly because they are rtf texts not simple strings,
so this kind of attributes are not listed.

但是有一种解决方法!
您可以向列添加自定义计算属性,该属性将从描述(注释)中返回转换后的字符串

But there is a workaround!
You can add an custom calculated attribute to columns which will return the converted string from description (comment)

首先,您必须在PDM模型中添加扩展,
转到 Model-> Extensions 并添加一个新的文件,
然后按照以下说明进行操作:

First of all you have to add an Extension to your PDM model,
go to Model->Extensions and add a new one,
then follow these instructions:

打开新创建的扩展名的属性
选择配置文件并右键单击,选择添加元类,选中并按OK.
选择并右键单击,选择 New-> Extended Attribute
给它起个名字
选择数据类型 string
检查计算
选择只读(获取方法)
选择获取方法脚本标签
替换

Open properties of newly created extension
Select Profile and right click, select Add Metaclasses, check Column and press OK.
Select Column and right click, select New->Extended Attribute
Give it a name
Select data type string
Check Computed
Select Read only (Get method)
Select Get Method Script tab
Replace

%Get% = ""

%Get% = Rtf2Ascii (obj.Description)

OK键关闭扩展程序属性窗口.
OK关闭扩展名列表窗口.

Press OK to close the extension properties window.
Press OK to close the extension list window.

现在打开工具->显示首选项->表格->高级->列
点击选择以获取列列表 检查新属性,然后按三下OK键返回到图表

Now open Tools->Display Preferences->Table->Advanced->Columns
Click Select for columns list Check your new attribute and press OK three times to return to diagram


享受

这篇关于为物理数据图中的表列添加注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆