Giter Site home page Giter Site logo

autocad-net-wizards's Introduction

AutoCAD .NET Wizards

Steps To Build

git clone https://github.com/ADN-DevTech/AutoCAD-Net-Wizards.git
cd AutoCAD-Net-Wizards\AutoCAD-Plugin-Template
devenv AutoCAD-Plugin.sln
msbuild PluginVsix\PluginVsix.csproj /t:build /p:Configuration=Release;Platform=x64
  • To create template packs for both C# and VB

    • Set ExamplePlugin as Start Up Project.

    • From Menubar->Project->Export Template

    • Repeat same for ExamplePluginVB

      ExportTemplate

Steps To Install

Tips

  • After creating the project from the template pack, edit launchSettings.json to change the executable path to acad.exe.

    • Wizard template fetches the AutoCAD NuGet package from the Microsoft NuGet Server.
    • The template project will resolve to the local NuGet package if it already exists at %USERPROFILE%\.nuget.
    • To add the ObjectARX SDK or Civil SDK from a local file disk, edit the project file (.csproj).
      • Add <AssemblySearchPaths>D:\Arx2025\inc\;$(AssemblySearchPaths)</AssemblySearchPaths>.
  • Select the project from solution explorer and right click.

    EdiProjectFile

  • A typical .NET plugin project to accomodate AutoCAD, ACA, C3D etc.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    <Platforms>x64</Platforms>
    <OutputType>Library</OutputType>
    <RootNamespace>Example</RootNamespace>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
  </PropertyGroup>
  <PropertyGroup>
     <!--Edit ArxSdk to local ObjectARX Path-->
    <ArxSdk>D:\ArxSDKs\arx2025</ArxSdk>
     <!--Edit AcadDir to AutoCAD 2025 Install path-->
    <AcadDir>D:\ACAD\venn\AutoCAD 2025</AcadDir>
    <ArxMgdPath>$(AcadDir)</ArxMgdPath>
    <OMFMgdPath>$(AcadDir)\ACA\</OMFMgdPath>
    <AeccMgdPath>$(AcadDir)\C3D\</AeccMgdPath>
    <AssemblySearchPaths>$(ArxSdk)\inc\;$(OMFMgdPath);$(AeccMgdPath);$(AssemblySearchPaths)</AssemblySearchPaths>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    <OutputPath>bin\x64\Debug\</OutputPath>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    <OutputPath>bin\x64\Release\</OutputPath>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>
  <PropertyGroup>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
  </PropertyGroup>
    <ItemGroup Condition=" '$(UsingMicrosoftNETSdk)' == 'true' or '$(CLRSupport)' == 'NetCore' ">
        <FrameworkReference Include="Microsoft.WindowsDesktop.App" />
    </ItemGroup>
    <ItemDefinitionGroup Condition=" '$(CLRSupport)' == 'NetCore' ">
        <ClCompile>
            <DisableSpecificWarnings>4945;%(DisableSpecificWarnings)</DisableSpecificWarnings>
        </ClCompile>
    </ItemDefinitionGroup>
  <ItemGroup>
    <Reference Include="acdbmgd">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ArxMgdPath)\acdbmgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="acmgd">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ArxMgdPath)\acmgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="accoremgd">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ArxMgdPath)\accoremgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="AecBaseMgd">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(OMFMgdPath)\AecBaseMgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="AeccDbMgd">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(AeccMgdPath)\AeccDbMgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <!--Add any other references here -->  

  </ItemGroup>
</Project>
  • launchSettings for various profiles
{
  "profiles": {
    "Example": {
      "commandName": "Project"
    },
    "Acad": {
      "commandName": "Executable",
      "executablePath": "$(AcadDir)\\acad.exe"
    },
    "C3D-Metric": {
      "commandName": "Executable",
      "executablePath": "$(AcadDir)\\acad.exe",
      "commandLineArgs": " /ld \"$(AcadDir)\\AecBase.dbx\" /p \"<<C3D_Metric>>\" /product C3D /language en-US"
    },
    "C3D-Imperial": {
      "commandName": "Executable",
      "executablePath": "$(AcadDir)\\acad.exe",
      "commandLineArgs": " /ld \"$(AcadDir)\\AecBase.dbx\" /p \"<<C3D_Imperial>>\" /product C3D /language en-US"
    }
  }
}

Uninstall Plugin VSIX

  • Through CLI
vsixinstaller /u:AutoCAD2025_07DA9910-9E94-471B-BD32-565D05D4D857
  • Through UI Uninstall-VSIX

Written By

  • Madhukar Moogala , Autodesk Platform Services (@galakar)

autocad-net-wizards's People

Contributors

autodesk-adn avatar cyrillef avatar duchangyu avatar madhukarmoogala avatar sidb89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autocad-net-wizards's Issues

Templates dont appear for Visual Studio 2022

I was successfully able to run the administrators install with the log file by creating a "Tests" folder in the same folder as the extracted installer and running the provided command in a powershell terminal using admin access.

That seemed to install to Programfiles (x86) under Autodesk. But when I would launch Visual Studio 2022 I would get no AutoCAD options. So then I copied the contents and pasted them in Documents\Visual Studio 2022\Templates\ProjectTemplates. When I opened Visual Studio 2022 I would see project template options, and I clicked C# and set the project name but then got an error

So I undo all of that and try just running the installer normally, not admin or by command line. The templates are installed in Documents\Visual Studio 2022\Templates\ProjectTemplates under Visual C# and Visual Basic. But then the options dont appear in Visual Studio 2022.

What is the proper way to use this installer?

Cannot install VS 2019, Autocad 2021

No matter what I do, I can't seem to get the .Net wizard installed.

I'm using VS 2019 and autocad 2021. I have literally every version of the .NET framework installed.

The installer says that it installed successfully, but the templates do not show up. I tried to install the objectarx template to see if anything would work, and was success installing those...

I took the READMEs advice, and ran it from the CMD prompt with admin privileges and output the log to a file. I find it has a bunch of errors like the following.

MSI (c) (A4:10) [20:48:30:502]: Note: 1: 2205 2: 3: Error
MSI (c) (A4:10) [20:48:30:503]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 2898
Info 2898.For VSI_MS_Sans_Serif13.0_0_0 textstyle, the system created a 'MS Sans Serif' font, in 0 character set, of 13 pixels height.
MSI (c) (A4:10) [20:48:30:504]: Note: 1: 2205 2: 3: Error
MSI (c) (A4:10) [20:48:30:505]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 2826
DEBUG: Error 2826: Control BannerBmp on dialog WelcomeForm extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: WelcomeForm, BannerBmp, to the right
MSI (c) (A4:10) [20:48:30:510]: Note: 1: 2205 2: 3: Error
MSI (c) (A4:10) [20:48:30:511]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 2898
Info 2898.For VsdDefaultUIFont.524F4245_5254_5341_4C45_534153783400 textstyle, the system created a 'MS Sans Serif' font, in 0 character set, of 13 pixels height.
MSI (c) (A4:10) [20:48:30:512]: Note: 1: 2205 2: 3: Error
MSI (c) (A4:10) [20:48:30:512]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 2826
DEBUG: Error 2826: Control Line1 on dialog WelcomeForm extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: WelcomeForm, Line1, to the right
MSI (c) (A4:10) [20:48:30:514]: Note: 1: 2205 2: 3: Error
MSI (c) (A4:10) [20:48:30:515]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 2826
DEBUG: Error 2826: Control Line2 on dialog WelcomeForm extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: WelcomeForm, Line2, to the right
MSI (c) (A4:10) [20:48:30:516]: Note: 1: 2205 2: 3: Error
MSI (c) (A4:10) [20:48:30:516]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 2898

I honestly think its a UI issue that is hosing everything up, but I really don't know...

Also, this is the output from the end

=== Logging stopped: 7/18/2020 21:19:43 ===
MSI (c) (E4:B0) [21:19:43:745]: Note: 1: 1707
MSI (c) (E4:B0) [21:19:43:745]: Note: 1: 2205 2: 3: Error
MSI (c) (E4:B0) [21:19:43:746]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1707
MSI (c) (E4:B0) [21:19:43:746]: Note: 1: 2205 2: 3: Error
MSI (c) (E4:B0) [21:19:43:746]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1709
MSI (c) (E4:B0) [21:19:43:747]: Product: AutoCAD 2021 .NET Wizards -- Installation completed successfully.

MSI (c) (E4:B0) [21:19:43:747]: Windows Installer installed the product. Product Name: AutoCAD 2021 .NET Wizards. Product Version: 24.0.0. Product Language: 1033. Manufacturer: Autodesk. Installation success or error status: 0.

MSI (c) (E4:B0) [21:19:43:749]: Grabbed execution mutex.
MSI (c) (E4:B0) [21:19:43:749]: Cleaning up uninstalled install packages, if any exist
MSI (c) (E4:B0) [21:19:43:750]: MainEngineThread is returning 0
=== Verbose logging stopped: 7/18/2020 21:19:43 ===

VS 2022 Installer

Hi,

Would it be possible to get and installer that works with VS Community 2022.

Thanks

Unable to install with Visual Studio 2019 community

I have installed Visual Studio 2019 community edition, and the installer says it requires version 2017.

image

I tried to manually copy the template in my document's Visual Studio templates folder, but when I try to create a project it gives me this error:

image

I tried to edit the project in order to handle VS 2019 without any luck.
Wix release 3.14 will bring visual studio 2019 related variables, so it would be great to upgrade to that version as soon as they relase it.

Missing VB templates

The updated wizard MSI with added support for VS2013 doesn't seem to have the VB templates in it.

I only see a C# autocad template.
image

User defined project name not set correctly in *.Designer.vb files in VB project

Issue:-
Default string AutoCAD_VB_plug_in used in place of user defined project name in the following files in a VB project created using AutoCAD 2024 VB plug-in:

  1. Resources.Designer.vb
  2. Settings.Designer.vb
  3. myCommands.Designer.vb

Result:- Build fails until resolved manually
Build started...
1>------ Build started: Project: KeepAttributesHorizontal, Configuration: Debug Any CPU ------
1>C:\Users\ayoad\source\repos\KeepAttributesHorizontal\KeepAttributesHorizontal\My Project\Settings.Designer.vb(67,48): error BC30002: Type 'Global.AutoCAD_VB_plug_in.My.MySettings' is not defined.
GIT_Issue_Wizard_VB_AutoCAD_VB_plug_in
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.