Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to NET 8.0 #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ build/
*.log
*.scc
*.VC.db
.vs*

# Visual C++ cache files
ipch/
Expand Down
102 changes: 54 additions & 48 deletions OPMNetExt/OPMNetExt.vcxproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand All @@ -24,61 +16,75 @@
<ArxAppType>arxnet</ArxAppType>
<RDS>asdk</RDS>
<ProjectName>asdkOPMNetExt</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<CLRSupport>NetCore</CLRSupport>
<TargetFramework>net8.0</TargetFramework>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>8.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>false</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PlatformToolset>v141</PlatformToolset>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets">
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\arxConfig.props" />
<Import Project="$(ArxSdk)\inc\rxsdk_Releasecfg.props" />
<Import Project="$(ArxSdk)\inc\arx.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\arx-config.props" />
<Import Project="..\arxConfig.props" />
<Import Project="$(ArxSdk)\inc\rxsdk_Debugcfg.props" />
<Import Project="$(ArxSdk)\inc\arx.props"/>
</ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>VC7;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>VC7;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<SmallerTypeCheck>false</SmallerTypeCheck>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>VC7;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>acdbmgd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>VC7;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>acdbmgd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
Binary file removed OPMNetSample/asdkOPMNetExt.dll
Binary file not shown.
100 changes: 24 additions & 76 deletions OPMNetSample/asdkOPMNetSample.csproj
Original file line number Diff line number Diff line change
@@ -1,83 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0EB66A7B-5A6D-49EA-8310-A9C4A87AE1DF}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>asdkOPMNetSample</RootNamespace>
<AssemblyName>asdkOPMNetSample</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>.\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="AcCoreMgd">
<HintPath>C:\ObjectARX 2019\inc\AcCoreMgd.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="AcCui">
<HintPath>C:\ObjectARX 2019\inc\AcCui.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="AcDbMgd">
<HintPath>C:\ObjectARX 2019\inc\AcDbMgd.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="AcMgd">
<HintPath>C:\ObjectARX 2019\inc\AcMgd.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="AdWindows">
<HintPath>C:\ObjectARX 2019\inc\AdWindows.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="customPropertySample.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblySearchPaths>D:\ArxSDKs\arx2025\inc\;$(AssemblySearchPaths)</AssemblySearchPaths>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.WindowsDesktop.App" />
</ItemGroup>
<ItemGroup>
<Reference Include="AcDbMgd">
<Private>False</Private>
</Reference>
<Reference Include="AcMgd">
<Private>False</Private>
</Reference>
<Reference Include="AcCoreMgd">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OPMNetExt\OPMNetExt.vcxproj">
<Project>{CD7C7C4F-E267-4E50-96DE-B1945176E84C}</Project>
<Name>asdkOPMNetExt</Name>
<Private>True</Private>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</ItemGroup>
</Project>
Binary file removed OPMNetSample/asdkOPMNetSample.dll
Binary file not shown.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

# OPM.Net Extension

[![build status](https://img.shields.io/badge/build-passed-blue.svg)](https://github.com/cyrillef/OPMNetExt/tree/master/OPMNetSample)
[![ObjectARX](https://img.shields.io/badge/ObjectARX-2019-blue.svg)](http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=773204)
[![AutoCAD](https://img.shields.io/badge/AutoCAD-2019-green.svg)](http://www.autodesk.com/developautocad)
[![ObjectARX](https://img.shields.io/badge/ObjectARX-2025-blue.svg)](http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=773204)
[![AutoCAD](https://img.shields.io/badge/AutoCAD-2025-green.svg)](http://www.autodesk.com/developautocad)
![Platforms](https://img.shields.io/badge/platform-windows-lightgray.svg)
[![License](http://img.shields.io/:license-mit-blue.svg)](http://opensource.org/licenses/MIT)

![NET8.0](https://img.shields.io/badge/.NET-8.0-blue.svg)

## Motivation

Expand All @@ -22,33 +21,42 @@ objects and commands to customize the display of properties in the property insp
this is far from complete. This library looks at exposing more of the standard Properties Palette
functionality to .NET languages.


## Description

## Dependencies

* Visual Studio 2022
* ObjectARX 2025

## Build Instructions

## Dependencies
```bash
git clone https://github.com/cyrillef/OPMNetExt.git
cd OPMNetExt
set ArxSdk=D:\ArxSdks\Arx2025
msbuild /t:build /p:Configuration=Debug;Platform=x64 OPMNetExt.sln
```

* Visual Studio 2017
* ObjectARX and AutoCAD from 2010 to 2019
## Release Build

```bash
msbuild /t:build /p:Configuration=Release;Platform=x64 OPMNetExt.sln
```

## Setup/Usage Instructions
## Further Reading

Please read Kean Walmsley' blog articles on how to use the library.

- [Exposing AutoCAD's Properties Palette functionality to .NET - Part 1](http://through-the-interface.typepad.com/through_the_interface/2009/03/exposing-autocads-properties-palette-functionality-to-net---part-1.html)
- [Exposing AutoCAD's Properties Palette functionality to .NET - Part 2](http://through-the-interface.typepad.com/through_the_interface/2009/03/exposing-autocads-properties-palette-functionality-to-net---part-2.html)


--------

## License

This sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Please see the [LICENSE](LICENSE) file for full details.


## Written by

Cyrille Fauvel (Autodesk Developer Network)<br />
Expand Down
Loading