Metered Licensing in Aspose.CAD
Introduction
Unlock the full potential of Aspose.CAD for Java with metered licensing! This step-by-step guide will walk you through the process of setting up metered licensing, ensuring seamless integration and optimal utilization of this powerful Java library for Computer-Aided Design (CAD). From prerequisites to importing packages and executing examples, this tutorial covers it all.
Prerequisites
Before diving into the world of metered licensing with Aspose.CAD, make sure you have the following in place:
Java Development Kit (JDK) Installation
Ensure that you have the latest version of Java Development Kit installed on your system. You can download it from here.
Aspose.CAD for Java Library
Make sure to download and set up the Aspose.CAD for Java library. You can find the library here.
Import Packages
In your Java project, import the necessary packages to start using Aspose.CAD functionalities. Use the following code snippet to add metered licensing to your project:
import com.aspose.cad;
Step 1: Set Metered Key
Firstly, set the metered key using the setMeteredKey
method. Replace <valid public key>
and <valid private key>
with your actual public and private keys.
Metered.setMeteredKey("<valid public key>", "<valid private key>");
Step 2: Get Consumption Quantity Before Processing
Retrieve the consumed quantity value before accessing the Aspose.CAD API to get an initial understanding.
BigDecimal quantityOld = Metered.getConsumptionQuantity();
System.out.println("Consumption quantity before processing: " + quantityOld);
Step 3: Processing
Perform your desired CAD processing using Aspose.CAD functionalities. Uncomment the code snippet related to your specific task, such as loading a CAD image.
// Example:
// com.aspose.cad.fileformats.cad.CadImage image =
// (com.aspose.cad.fileformats.cad.CadImage)com.aspose.cad.Image.load("BlockRefDgn.dwg");
Step 4: Get Consumption Quantity After Processing
After processing, obtain the consumed quantity value again to assess the impact.
BigDecimal quantity = Metered.getConsumptionQuantity();
System.out.println("Consumption quantity after processing: " + quantity);
Repeat these steps for any additional processing or tasks as needed.
Conclusion
Congratulations! You’ve successfully mastered metered licensing with Aspose.CAD for Java. By following this guide, you’ve set up and integrated metered licensing seamlessly into your Java project, ensuring efficient usage of Aspose.CAD capabilities.
FAQ’s
Q1: Can I use metered licensing for evaluation purposes?
A1: Yes, you can obtain a free trial license here.
Q2: Where can I find detailed documentation for Aspose.CAD for Java?
A2: Refer to the documentation here.
Q3: How do I purchase a license for Aspose.CAD for Java?
A3: Visit the purchase page here.
Q4: Is there a temporary license option available?
A4: Yes, you can explore temporary licenses here.
Q5: Need community support or have specific questions?
A5: Head to the Aspose.CAD forum here.