私のアプリケーションでは、mpxjを使用してMicrosoft Projectファイルからアイテムを取得しています。必要なアイテムの1つは、先行アイテムです。前任者を引っ張ることができる方法は、java.util.listのタイプを返すmpxjのビルドイン関数を使用することです-これをオブジェクトとして変数に保存できますが、データをにもたらす方法を見つける必要があります簡単に使用できるフォーマットなので、データベースに保存できます。以下にリストされているのは、プロジェクトファイルから先行タスクをプルするために使用しているコード行です。
Dim predecessors = task.getPredecessors
トレースポイントを入れて前任者の値を取得したときの結果は次のとおりです
[[Relation [Task id=4 uniqueID=45577 name=Standards Training - Round 2] -> [Task id=3 uniqueID=45576 name=Process Excellence Training]]]
上記を文字列として取得できたとしても、必要なデータを取得するのに十分な作業を行うことができました。上記の例では、先行リストに1つのアイテムがありますが、複数のアイテムがある場合があります。複数のアイテムがある場合のトレースポイントの例を次に示します。
[[Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=47 uniqueID=45857 name=Organizational Assessment]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=49 uniqueID=45859 name=Document Deliverables]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=56 uniqueID=45866 name=Infrastructure Deliverables]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=58 uniqueID=45868 name=IT Deliverables]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=60 uniqueID=45870 name=Organizational Deliverables]]]
ご協力ありがとうございました。