2013-03-04 22 views
1

我正在使用一種in-links類型的正式模塊。這些鏈接(我們稱之爲Type X鏈接)由4個不同的正式模塊組成,共4個深度級別。例如我在模塊A正在處理中,具有在鏈接從模塊B中,具有在鏈接從模塊C中,具有在鏈接從模塊D.顯示來自其他模塊的DXL列

我有一個視圖,顯示在不同的列每個鏈路中級別:列1:深度1鏈路(AB),列2:深度2鏈路(BC),列3:深度3鏈路(CD)。

每列由腳本生成這樣的:

pragma runLim, 0 
    int lines[4] = {0, 0, 0, 0} 
    void adjustLines(int depth, showAtDepth) { 
    int count 
    for (count = 0; count < 4; count++) { 
    while (lines[depth-1] < lines[count]) { 
     if (depth == showAtDepth) displayRich("\\pard " " ") 
     lines[depth-1]++ 
    } 
    } 
} 
void showIn(Object o, int depth) { 
Link l 
LinkRef lr 
ModName_ otherMod = null 
Module linkMod = null 
ModuleVersion otherVersion = null 
Object othero 
string disp = null 
string s = null 
string plain, plainDisp 
int plainTextLen 
int count 
bool doneOne = false 

    string linkModName = "../links/TYPE X" 
    for lr in all(o<-linkModName) do { 
     otherMod = module (sourceVersion lr) 
     if (!null otherMod) { 
      if ((!isDeleted otherMod) && (null data(sourceVersion lr))) { 
       load((sourceVersion lr),false) 
      } 
     } 
    } 
    for l in all(o<-linkModName) do { 
     otherVersion = sourceVersion l 
     otherMod = module(otherVersion) 
     if (null otherMod || isDeleted otherMod) continue 
     othero = source l 
     if (null othero) { 
      load(otherVersion,false) 
     } 
     othero = source l 
     if (null othero) continue 
     if (isDeleted othero) continue 
     int oldLines = lines[depth-1] 
     adjustLines(depth, 1) 
     bool kick = (doneOne) && (lines[depth-1] == oldLines) 
     if (kick) { 
      lines[depth-1]++ 
      if (depth == 1) displayRich("\\pard " " ") 
     } 
     if (depth < 4) { 
      showIn(othero, depth+1) 
     } 
     doneOne = true 
     if (depth == 1) { 
      s = name(otherMod) 
      if (isBaseline(otherVersion)) { 
       s = s " [" versionString(otherVersion) "]" 
      } 

     s = "{\\b " s " : }" 
     s = s " " probeRichAttr_(othero,"Object Heading", false) 
     s = s " " probeRichAttr_(othero,"Object Text", false) 

     displayRich s 

     } 
     lines[depth-1] += 3 
    } 
} 
showIn(obj,1) 

然而現在,我要添加包含模塊C和其他新的模塊做之間定義的其他類型的鏈路(類型Y)的新列不直接與我的模塊(A)。幸運的是,我將這些關係放在模塊C的一列(作爲佈局dxl)。

我怎麼能顯示我的模塊中(A)在模塊(C)保存的視圖中列被保存在我目前的看法?

預先感謝您的合作,您的幫助

+0

我認爲最簡單的解決辦法是使佈局DXL您在模塊C一DXL屬性都有。如果您將佈局DXL轉換爲DXL屬性,則可以直接從模塊A中的佈局DXL調用它。如果您從模塊C發佈佈局DXL,我可以幫助您將其修改爲DXL屬性。 – 2013-03-27 18:13:37

回答

0

按照X型鏈接模塊C,然後按照Y型連接。

變化:

string linkModName = "../links/TYPE X" 

要:

string linkModName = (depth<3) ? "../links/TYPE X" : "../links/TYPE Y" 

您可能需要不同數量的我不知道你的結構。

相關問題