メーター制ライセンス
Contents
[
Hide
]Aspose.CAD は、開発者がメーター制のキーを適用できるようにします。これは新しいライセンスメカニズムです。新しいライセンスメカニズムは、既存のライセンス方法と併用されます。API機能の使用量に基づいて請求されたい顧客は、メーター制ライセンスを使用できます。詳細については、メーター制ライセンスFAQ セクションを参照してください。
メーター制ライセンス
メータークラスを使用するための簡単な手順は以下の通りです。
- メータークラスのインスタンスを作成します。
- 公開鍵と秘密鍵を SetMeteredKey メソッドに渡します。
- 処理を行います(タスクを実行します)。
- メータークラスの GetConsumptionQuantity メソッドを呼び出します。
- それは、これまでに消費したAPIリクエストの量/数量を返します。
次に、メーター制公開鍵と秘密鍵を設定する方法を示すサンプルコードがあります。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aspose.cad as cad | |
// Access the setMeteredKey property and pass public and private keys as parameters | |
Aspose.CAD.Metered.SetMeteredKey("PublicKey", "PrivateKey"); | |
// Get metered data amount before calling API | |
amountbefore = cad.Metered.get_consumption_quantity() | |
// Display information | |
print("Amount Consumed Before: " + amountbefore.ToString()); | |
// Do processing | |
image = cad.Image.load("file.dwg"); | |
// Get metered data amount After calling API | |
amountafter = cad.Metered.get_consumption_quantity() | |
// Display information | |
print("Amount Consumed After: " + amountafter); |