Skip to content

Commit e4701d4

Browse files
committed
AutoCAD 2015 .net wizard for VS2012/2013
This is for AutoCAD 2015, support VS2012 PRO, VS2012 Express for Desktop, VS2013 PRO and VS2013 Express for Desktop
1 parent e9d793e commit e4701d4

49 files changed

Lines changed: 3329 additions & 52 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AutoCAD CSharp plug-in/AutoCAD CSharp plug-in - 2015.csproj

Lines changed: 467 additions & 0 deletions
Large diffs are not rendered by default.

AutoCAD CSharp plug-in/AutoCAD CSharp plug-in.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
</BootstrapperPackage>
8080
</ItemGroup>
8181
<ItemGroup>
82-
<None Include="Template Data\MyTemplate.vstemplate" />
82+
<None Include="Template Data\MyTemplate.vstemplate">
83+
<SubType>Designer</SubType>
84+
</None>
8385
<None Include="Template Data\__TemplateIcon.ico" />
8486
</ItemGroup>
8587
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
@@ -90,7 +92,7 @@ mkdir "$(SolutionDir)Output\$(ProjectName)\Properties" 2&gt;nul
9092
cd "$(SolutionDir)Output\$(ProjectName)"
9193
if exist "$(SolutionDir)Output\$(ProjectName).zip" del "$(SolutionDir)Output\$(ProjectName).zip"
9294
del *.* /s /q &gt; nul
93-
copy /Y "$(ProjectDir)$(ProjectName) - 2014.csproj" ".\$(ProjectName).csproj" &gt; nul
95+
copy /Y "$(ProjectDir)$(ProjectName) - 2015.csproj" ".\$(ProjectName).csproj" &gt; nul
9496
copy /Y "$(ProjectDir)myPlugin.cs" . &gt; nul
9597
copy /Y "$(ProjectDir)myCommands.cs" . &gt; nul
9698
copy /Y "$(ProjectDir)myCommands.resx" . &gt; nul

AutoCAD CSharp plug-in/Template Data/MyTemplate - WDExpress.vstemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
22
<TemplateData>
3-
<Name>AutoCAD 2014 CSharp plug-in</Name>
3+
<Name>AutoCAD 2015 CSharp plug-in</Name>
44
<Description>This is a basic AutoCAD Plugin in C#</Description>
55
<ProjectType>CSharp</ProjectType>
66
<ProjectSubType></ProjectSubType>

AutoCAD CSharp plug-in/Template Data/MyTemplate.vstemplate

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
22
<TemplateData>
3-
<Name>AutoCAD 2014 CSharp plug-in</Name>
3+
<Name>AutoCAD 2015 CSharp plug-in</Name>
44
<Description>This is a basic AutoCAD Plugin in C#</Description>
55
<ProjectType>CSharp</ProjectType>
66
<ProjectSubType></ProjectSubType>
77
<SortOrder>1000</SortOrder>
8-
<RequiredFrameworkVersion>4.0</RequiredFrameworkVersion>
9-
<MaxFrameworkVersion>4.0</MaxFrameworkVersion>
8+
<RequiredFrameworkVersion>4.5</RequiredFrameworkVersion>
9+
<MaxFrameworkVersion>4.5</MaxFrameworkVersion>
1010
<TemplateID>Autodesk.CSharp.AutoCAD191_plugin</TemplateID>
1111
<CreateNewFolder>true</CreateNewFolder>
1212
<DefaultName>AutoCAD CSharp plug-in</DefaultName>

AutoCAD CSharp plug-in/myCommands.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ public class MyCommands
3434
public void MyCommand() // This method can have any name
3535
{
3636
// Put your command code here
37+
Document doc = Application.DocumentManager.MdiActiveDocument;
38+
Editor ed ;
39+
if (doc != null)
40+
{
41+
ed = doc.Editor;
42+
ed.WriteMessage("Hello, this is your first command.");
3743

44+
}
3845
}
3946

4047
// Modal Command with pickfirst selection

0 commit comments

Comments
 (0)