Created
          August 20, 2024 07:37 
        
      - 
      
 - 
        
Save conholdate-com-kb/87eeca7b0fd913b0699a37964377b51d to your computer and use it in GitHub Desktop.  
    Code to Merge Visio Files in Java. For more details: https://kb.conholdate.com/total/java/how-to-merge-visio-files-in-java/
  
        
  
    
      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 com.aspose.diagram.License; | |
| public class AsposeTest { | |
| public static void main(String[] args) throws Exception {//Main function to combine Visio diagram using Java | |
| // Instantiate the license | |
| License lic = new License(); | |
| lic.setLicense("Aspose.Total.lic"); | |
| // Load destination Visio diagram | |
| com.aspose.diagram.Diagram diagramDest = new com.aspose.diagram.Diagram("Input.vsdx"); | |
| // Load source Visio diagram | |
| com.aspose.diagram.Diagram diagramSource = new com.aspose.diagram.Diagram("Input.vsdx"); | |
| // Merge Visio diagrams | |
| diagramDest.combine(diagramSource); | |
| // Save output Visio diagram | |
| diagramDest.save("Merged.vsdx" , com.aspose.diagram.SaveFileFormat.VSDX); | |
| System.out.println("Done"); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment