DXL編程,經過DOORS客戶端中的DXL編輯窗口進行,DXL的幫助文檔在文件的安裝目錄中能夠查閱編程
獲取一個對象的url:數組
Object o = current
string u =getURL(o)
print uide
獲取模塊的url:url
Module m = current
string u =getURL(m)
print uspa
獲取對象的heading:對象
Object o = current
string n = o."Object Heading"
print n文檔
打印對象的順序編號,標題,內容,URL:get
Object o = current
string n = identifier o //此處爲順序編號,不存在1,1.1,1.2這種編號,如需輸出分級編號須要用number(o) string
string h = o."Object Heading"
string r = getURL(o)
string t = o."Object Text"
if(t==null)
{
t="null"
}
print n
print "\n"
print h
print "\n"
print r
print "\n"
print t
print "\n"it
遍歷模塊中的需求對象,將需求的編號,標題,內容,URL寫入相應模塊名字的txt文件:
Object o //定義對象
int m = 0 //定義數組下標
Module u = current //定義模塊
string shishi= "D:\\" u."Name" ".txt" //定義以模塊名字存儲文件
Stream out = write shishi //定義寫入文件
string n[1000]={null} //定義需求的編號數組
string h[1000]={null} //定義需求的標題數組
string r[1000]={null} //定義需求的URL數組
string t[1000]={null} //定義需求的內容數組
string e //定義需求的總數變量
for o in current Module do //遍歷當前模塊中的全部對象
{
n[m] = number(o) //存入需求編號
h[m] = o."Object Heading" //存入需求標題
r[m] = getURL(o) //存入需求的URL
t[m] = o."Object Text" //存入需求的內容
e = identifier o //記錄需求的數量
if(t[m]==null) //當需求內容爲空時存入null
{
t[m]="null"
}
m++ //數組下標++
}
out<<e //文件第一行寫入需求對象的總數
out<<"\n"
for(i=0;i<m;i++) //循環寫入數組中的全部需求內容{out<<n[i] out<<"\n" out<<h[i] out<<"\n" out<<r[i] out<<"\n" out<<t[i] out<<"\n" }