ログイン
検索
メインメニュー
フォーラム一覧   -   トピック一覧
   astah*の使い方
     APIを利用した複合フラグメントの位置調節について
投稿するにはまず登録を

フラット表示 前のトピック | 次のトピック
投稿者 トピック
tiwa___
投稿日時: 2020-11-17 17:25
開発者
登録日: 2019-7-29
居住地:
投稿: 8
Re: APIを利用した複合フラグメントの位置調節について
申し訳ありませんが、APIから複合フラグメントの幅や位置を変更する事は出来ません。

下記サンプルスクリプトの様にオペランドの高さを変更する事で
複合フラグメントの高さを変更する事は可能です。

var infNamespace = 'com.change_vision.jude.api.inf'
var PresentationPropertyUtil = Java.type(infNamespace + '.presentation.PresentationPropertyUtil')

getSelectedPresentations().forEach(
    function (presentation) {
        try {
            astah.getTransactionManager().beginTransaction()
            presentation.setProperty(PresentationPropertyUtil.createOperandLengthKey(1), 500)
            astah.getTransactionManager().endTransaction()
        } catch (e) {
            astah.getTransactionManager().abortTransaction()
            throw e
        }    
    }
)

function getSelectedPresentations() {
    var viewManager = astah.getViewManager()
    var diagramViewManager = viewManager.getDiagramViewManager()
    var selectedPresentations = diagramViewManager.getSelectedPresentations()
    return Java.from(selectedPresentations)
}
フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
   APIを利用した複合フラグメントの位置調節について yura 2020-11-17 15:32
   » Re: APIを利用した複合フラグメントの位置調節について tiwa___ 2020-11-17 17:25
       Re: APIを利用した複合フラグメントの位置調節について yura 2020-11-17 18:11
         Re: APIを利用した複合フラグメントの位置調節について tiwa___ 2020-11-19 11:11
           Re: APIを利用した複合フラグメントの位置調節について yura 2020-11-19 12:11

投稿するにはまず登録を