Skip to content

Latest commit

 

History

History
54 lines (32 loc) · 2.51 KB

File metadata and controls

54 lines (32 loc) · 2.51 KB

learn.forge.designautomation - AutoCAD

Platforms .NET AutoCAD

Basic

Description

AutoCAD plugin that updates the width and height of a Dynamic Block.

Setup

Prerequisites

  1. Visual Studio 2017
  2. AutoCAD 2019 required to compile changes into the plugin
  3. 7z zip requires to create the bundle ZIP, download here

References

This AutoCAD plugin requires AcCoreMgd and AcDbMgd references, which should restore from NuGet. If not, right-click on References, then Manage NuGet Packages, search for AutoCAD.NET and add AutoCAD.NET Core.

Build

Under Properties, at Build Event page, the following Post-build event command line will copy the DLL into the \UpdateDWGParam.bundle/Content\ folder, create a .ZIP (using 7z) and copy to the Webapp folder.

xcopy /Y /F $(TargetDir)*.dll $(ProjectDir)UpdateDWGParam.bundle\Contents\
del /F $(ProjectDir)..\forgesample\wwwroot\bundles\UpdateDWGParam.zip
"C:\Program Files\7-Zip\7z.exe" a -tzip $(ProjectDir)../forgesample/wwwroot/bundles/UpdateDWGParam.zip  $(ProjectDir)UpdateDWGParam.bundle\ -xr0!*.pdb

Debug Locally

Please review this section of the My First Plugin Tutorial. The plugin should load and work on AutoCAD 2019 desktop.

To better emulate the Design Automation approach, it's better to debug with AutoCAD Console. This blog post describes how to use it.

Further Reading

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Madhukar Moogala @galakar, Forge Partner Development