アーティクル - CS370585

Creo View WebGL Toolkitの例「web-application-example」では、StructureEdit.InsertBranches()によっていくつかのコンポーネントを追加し、それらのいくつかを削除した後、ツリーで新しく追加されたノードを選択しても、グラフィカルウィンドウで正しいモデルが選択されません。

修正日: 01-Jul-2022   


注記:ここに記載されている情報は、お客様の利便性向上のため機械翻訳ソフトを使用しています。PTCは、ここに記載されている情報の翻訳の正確性について、一切の責任を負いませんので、ご了承ください。英語の原文を参照するには、こちら。この機械翻訳に関する詳細は、こちら。
お知らせいただき、ありがとうございます。この機械翻訳をレビューします。

適用対象

  • Creo View 8.1
  • Creo View WebGL Toolkit

説明

  • Creo View WebGL Toolkitの例web-application-exampleでは、 StructureEdit.InsertBranches()によっていくつかのコンポーネントを追加し、それらのいくつかを削除した後、[構造]タブのツリーで新しく追加されたノードを選択しても、グラフィカルウィンドウで正しいモデルが選択されません。
  • StructureEdit.RemoveComps()によってコンポーネントが削除されると、ツリーとビューのデータに一貫性がなくなります。
  • $ scope.ibDlgInsert()は、次のように変更されます。
$scope.ibDlgInsert = function() {
	if ($scope.structEdit.ibUrl == "")
		return;
	$scope.hideDialog();

	var se = $scope.session.GetStructureEdit();
	if (se) {
		let it = $scope.selection.nodes.values();
		let idpath = it.next().value;
		if (!idpath) return;
		let node = $scope.idpathMap[idpath];
		if (node) {
			$scope.SetCurrentModel(node.data.modelId);
			if ($scope.model) {
				var strippedIdpath = $scope.StripModelIdFromIdPath(node.data.idpath);

				if (strippedIdpath == ':') {
					// root node
					console.log('You cannot merge into root node.');
				} else {
					var IdNameFileVector = Module.IdNameFileVector.Create();
					IdNameFileVector.InsertIdNameFile(strippedIdpath, $scope.structEdit.ibName == '' ? "option2" : $scope.structEdit.ibName, $scope.structEdit.ibUrl);

					se.InsertBranches(IdNameFileVector, true, true, true, function (success) {
						if (success) {
							console.log('Successfully merged');
						} else {
							console.log('Failed to merge');
						}
					});
					$scope.ClearNodeSelection();

					if (dbRecentPVS == undefined) return;
					var dataSet = dbRecentPVS.transaction("RecentPVSObjectStore", "readwrite").objectStore("RecentPVSObjectStore").get($scope.structEdit.ibUrl);
					dataSet.onsuccess = function(event) {
						if (event.currentTarget.result === undefined) {
							storeRecentUrl($scope.structEdit.ibUrl);
						}
					};
				}
			}
		}
	}
};
最新バージョンはこちらを参照ください CS370585