16 Aug 2018

Comparing AutoCAD Drawings with Forge Design Automation

Default blog image

A drawing snapshot displaying visual graphical differences

We have received a query on how Compare two drawings in Forge Design Automation API

This post assumes you have working knowledge of consuming Forge Design Automation, if not please get comfortable with this post

Workitem Json

{
	"Arguments": {
		"InputArguments": [
			{
				"Resource": "https://madhukar-fda.s3.us-west-2.amazonaws.com/Kitchens1.dwg",
				"Name": "HostDwg"
			},
			{
				"Resource": "https://madhukar-fda.s3.us-west-2.amazonaws.com/Kitchens2.dwg",
				"Name": "ToCompareWith"
			}
		],
		"OutputArguments": [
			{
				"Name": "Result",
				"HttpVerb": "POST"
			}
		]
	},
	"ActivityId": "FPDCompare"
}

Activity Json

{
	"HostApplication": "",
	"RequiredEngineVersion": "23.0",
	"Parameters": {
		"InputParameters": [
			{
				"Name": "HostDwg",
				"LocalFileName": "$(HostDwg)"
			},
			{
				"Name": "ToCompareWith",
				"LocalFileName": "ToCompareWith.dwg"
			}
		],
		"OutputParameters": [
			{
				"Name": "Result",
				"LocalFileName": "output.dwg"
			}
		]
	},
	"Instruction": {
		"CommandLineParameters": null,
		"Script": "COMPAREINPLACE\nON\n-COMPARE\n\nToCompareWith.dwg\n_SAVEAS\n\noutput.dwg\n"
	},
	"Id": "FPDCompare"
}

 

Related Article