We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting Started

Hi. I am new to Aspose. I downloaded aspose-diagram-17.5 along the GIT Aspose.Diagram-for-Java-master example files and I am getting errors trying to compile the examples. Not a good start out experience! Where is the best place to find getting started information: examples, etc that will work



Hi Clyde,

Thank you for contacting support. All code examples will work in your environment, you need to remove old artifacts and then add references of Aspose.Diagram for Java and Aspose.Words for Java APIs because in few code examples we are using both Aspose APIs. It will be fixed soon on Github. Please refer to the developer’s guide of Aspose.Diagram for Java API: Developers Guide of Aspose.Diagram for Java API

You can get a 30 day temporary license for the testing purposes. A temporary license is a time-restricted full license that lets you test every aspect of a product before buying it. Please refer to these helping links: Get a 30 day Temporary License and Apply License to Aspose.Diagram for Java API

Hi Imran:

Thank you for responding. I added aspose.words to the class files but the errors persist. Note the following for the sample code:

<pre style=“background-color: rgb(255, 255, 255); font-family: “Courier New”; font-size: 9pt;”>getInheritFill is causing the problem

<pre style=“background-color: rgb(255, 255, 255); font-family: “Courier New”; font-size: 9pt;”>public static void main(String[] args) throws Exception {
// ExStart:AddWindowElementInVisio
// The path to the documents directory.
String dataDir = Utils.getSharedDataDir(RetrieveInheritedFillData.class) + “Shapes/”;

// Call the diagram constructor to load a VSDX diagram
Diagram diagram = new Diagram(dataDir + “Drawing1.vsdx”);

// Get page by ID
Page page = diagram.getPages().getPage(“Page-1”);
// Get shape by ID
Shape shape = page.getShapes().getShape(1);
// Get the fill formatting values

Hi Clyde,

Thank you for the details. It appears as you have added reference of Aspose.Words API in this class. The shape class is available in both Aspose.Words and Aspose.Diagram APIs. Please remove the reference of Aspose.Words API or declare a shape object using the complete package name like"com.aspose.diagram.Shape". Please download and try the following project: Aspose.Diagram for Java Examples