このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。
slreportgen.report.Diagram.customizeReporter
クラス: slreportgen.report.Diagram
パッケージ: slreportgen.report
カスタム ブロック線図レポーター クラスを作成
構文
reporter = slreportgen.report.Diagram.customizeReporter(classpath)
説明
reporter = slreportgen.report.Diagram.customizeReporter(
は、classpath
)slreportgen.report.Diagram
のサブクラスであるブロック線図クラス定義ファイルを作成します。ファイルは指定した classpath
の場所に作成されます。さらに、customizeReporter
メソッドは、既定のブロック線図テンプレートを <classpath>/resources/template
フォルダーにコピーします。新しいクラス定義ファイルを開始点として使用して、レポート用のカスタムのブロック線図クラスを設計できます。
入力引数
出力引数
例
カスタム ブロック線図レポーターの作成
カスタム ブロック線図レポーターとそれに関連する既定のテンプレートを作成します。派生クラス ファイルは現在の作業フォルダーに対する指定した相対パスに作成されます。この場合、MyDiagram.m
クラス ファイルのパスは <current working folder>/newDiagram/@MyDiagram/MyDiagram.m
です。既定のブロック線図テンプレートは <current working folder>/newDiagram/@MyDiagram/resources/templates
フォルダーにあります。
import slreportgen.report.* Diagram.customizeReporter('newDiagram/@MyDiagram');
この新しいクラス ファイルを編集してモデルを読み込むと、新しいブロック線図レポーターを使用できます。
slrgex_sf_car; diagram = MyDiagram('slrgex_sf_car');
バージョン履歴
R2017b で導入