August 16, 2018

Comparing AutoCAD Drawings with Forge Design Automation

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"
}

 

Posted by

Madhukar Moogala

A technology agnostic, constant learner, and a Forge advocate who works primarily on AutoCAD and Forge Design Automation using both desktop and cloud programming techniques. He has been with Autodesk since 2013, started his career as C++ programmer, explored everything that has come in his way be it Lisp or Wix, passionate about modern technologies and loves troubleshooting. 


In his free time...

Related Posts