To Set up a New Project

Before you can implement a new standard, you must create a new project from your development environment. Alternatively, you may use the sample project AecSpaceOffsetStandardSample.

Note: An area calculation standard plug-in is implemented as a .NET class library, not a Windows application.
  1. Open Microsoft Visual Studio 2005.
  2. Select the New tab on the main menu.
  3. Click File menu Project.
  4. In the New Project dialog box, choose the class library template from one of these locations:
    • Visual Basic Windows
    • Visual C# Windows
    • Visual C++ CLR.
  5. Enter a name for the new project.

    It is recommended to use the prefix AecAreaCalculationStandard, for example to create a name like AecAreaCalculationStandardMyOffsetRules. This way the naming is consistent with the naming of the plug-ins provided with AutoCAD Architecture 2024 toolset (for example AecAreaCalculationStandardBasic, AecAreaCalculationStandardBOMA, etc.) The software then recognizes that this prefix describes an area calculation plug-in and is able the extract the name from the assembly for diagnostic purposes.

    Before proceeding, verify that you have a .NET class library project set up, so you can start editing the source code and project files.

  6. In order to create an area calculation standard plug-in, the .NET class library created in the previous steps needs to reference the .NET API that AutoCAD Architecture 2024 toolset provides. This API is implemented in the AecSpaceOffsetRuleManager.dll assembly which you need to reference in your new project.
  7. If you are working with Microsoft Visual Studio, you can add the assembly reference to AecSpaceOffsetRuleManager.dll to your class library project by right-clicking References in the Solution Explorer of the project, and selecting Add Reference.
  8. Navigate to the Browse page on the property sheet and search for the AecSpaceOffsetRuleManager.dll assembly under C:\Program Files\ACA <version> (or the path you chose during installation).
  9. Add references to the following assemblies of your installation:
    • acdbmgd.dll (AutoCAD .NET API)
    • aecbasemgd.dll (AutoCAD Architecture 2024 toolset base classes)
    • aecarchmgd.dll (AutoCAD Architecture 2024 toolset objects)

    These DLLs are found in the same folder as the AecSpaceOffsetRuleManager.dll assembly.

  10. Right-click each reference in the Solution Explorer tree under References, and click Properties to verify that the Copy Local reference property is set to False for each of the references.
  11. Setting up copying the .dll so that AutoCAD Architecture 2024 toolset can reference it.

    AutoCAD Architecture 2024 toolset searches for custom area calculation standard assemblies in C:\Program Files\AutoCAD Architecture <version>\Space Calculation Standards, or the path you chose during installation. Each time you compile the .dll you need to restart AutoCAD Architecture 2024 toolset in order to load and test it. Do the following to set up copying the .dll to the appropriate folder each time it is compiled.

  12. Select the project in the Solution Explorer.
  13. Right-click, and click Properties.
  14. Click the Build Events tab.
  15. On the Post-build event command line, enter the following:
    @if exist $(TargetPath) @copy $(TargetPath) "C:\Program Files\AutoCAD Architecture <version>\Space Calculation Standards\"
    @if exist $(TargetDir)$(TargetName).pdb @copy $(TargetDir)$(TargetName).pdb "C:\Program Files\AutoCAD Architecture <version>\Space Calculation Standards\"