1

私は、1 種類のインリンクを持つ正式なモジュールで作業しています。これらのリンク (タイプ X リンクと呼びます) は、4 つの異なる形式モジュールから 4 つの深さレベルで作成されます。たとえば、私はモジュール A で作業しており、モジュール B からのインリンクがあり、モジュール C からのインリンクがあり、モジュール D からのインリンクがあります。

リンク内の各レベルを異なる列に表示するビューがあります: 列 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 とモジュール (A) に直接リンクされていない他の新しいモジュールとの間で定義された他のタイプのリンク (タイプ Y) を含む新しい列を追加する必要があります。幸いなことに、モジュール C の列にこれらの関係があります (レイアウト dxl として)。

モジュール (A) で、モジュール (C) のビューに保存された列を現在のビューに保存するように表示するにはどうすればよいですか?

どうぞよろしくお願いいたします。

4

1 に答える 1

0

モジュール C へのタイプ X のリンクをたどってから、タイプ Y のリンクをたどります。

変化する:

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

に:

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

構造がわからないため、別の番号が必要になる場合があります。

于 2013-05-06T07:19:51.727 に答える