天天看點

Win10或Win8下ObjectARX* Wizard向導建立項目失敗解決方法

http://www.cnblogs.com/edata/p/6796025.html
           
Win10或Win8下ObjectARX2015 Wizard向導建立項目失敗解決方法
[原創]objectARX 2015 Wizard安裝向導在Win8/win10下無法建立項目的解決方法總結
by edata @2017-5-1
objectARX 2015 Wizard安裝向導在Win8/win10下無法建立項目的解決方法
因為Win8/Win10對系統盤(預設c:)使用了進階權限管理,是以在此盤下操作檔案的修改工作都需要管理者權限才行。
基于這個原因,導緻非管理者安裝Wizard無法建立arx項目,經過多方查找和研究,終于找到一個可行的辦法。
我在win10+vs2012+objectarx2015通過測試,其他版本無法建立的問題,應該是類似的。
方式一:給(objectARX 2015 Wizard.msi)msi檔案右鍵添加以管理者運作的菜單。
(參考資料:http://www.52windows8.com/use-of-skills/8197.html)
建立一個文本檔案,并儲存為 MSI右鍵添加管理者運作.reg 的系統資料庫檔案,輸入一下内容,儲存後,輕按兩下這個 檔案執行導入系統資料庫。


Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT\Msi.Package\shell\runas]
@="以管理者運作"


[HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
@="msiexec /i \"%1\""




成功導入改系統資料庫檔案之後,再 objectARX 2015 Wizard.msi 檔案上右鍵 以管理者運作 執行安裝。
安裝完畢後,應該就可以正常使用向導生成了。


方式二:(理論階段,還未驗證)
基于win8/win10的權限非管理者,導緻安裝了objectARX 2015 Wizard.msi,無法建立項目檔案。
安裝Wizard之後,在vc模闆中能看到Arx的兩個向導名稱(我的能看到2015+2012兩個向導),這個時候我們可以檢測vs的目錄的Wizard目錄下的檔案。
預設路徑:C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcprojects\Autodesk\
将 ArxAppWiz.vsz 複制到桌面或者C:盤以外的地方(如d:),因為直接打開也無法因為權限無法儲存,是以複制再改,然後用記事本打開這個檔案。


可能是如下内容


VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.[WIZVERSION]
Param="WIZARD_NAME = ArxAppWiz"
Param="ABSOLUTE_PATH = [TARGETDIR]ArxAppWiz"
Param="FALLBACK_LCID = 1033"


正常情況下檔案應該是


VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.11.0
Param="WIZARD_NAME = ArxAppWiz"
Param="ABSOLUTE_PATH = C:\Program Files (x86)\Autodesk\ObjectARX 2015 Wizards\ArxAppWiz"
Param="FALLBACK_LCID = 1033"


我們可以看到沒有用管理安裝的檔案沒有改掉關鍵項,[WIZVERSION][TARGETDIR]這兩個還是臨時名。
簡單的說第二行是向導的使用的vs向導版本,這裡是vs2012,是以是VsWizard.VsWizardEngine.11.0,vs2013應該是12.0,vs2015是14.0,vs2017沒研究,好像改成了系統資料庫的clsid,沒有深入研究。
第三行是向導的路徑,這裡是2015的預設路徑,新版向導安裝的時候是無法更改這個路徑的。


改了這個檔案,儲存後再複制到原來的目錄。(C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcprojects\Autodesk\)


下面還需要改一下arx的配置模闆檔案,

預設路徑C:\Program Files (x86)\Autodesk\ObjectARX 2015 Wizards\



同樣複制 Autodesk.arx-2015.props 這個檔案(預設會隐藏.props字尾)到桌面或者d:盤
記事本打開檔案
找到并修改 <ArxSdkDir>C:\ObjectARX\</ArxSdkDir> 為 <ArxSdkDir>C:\ObjectARX 2015\</ArxSdkDir>
C:\ObjectARX 2015\就是你的ObjectARX SDK包解壓的位置,預設是這個目錄,如果你解壓到了其他位置,就要修改成你的正确位置。
下面還有其他類似的項都需要修改。
這樣就應該可以正常建立ARX項目檔案了。
如果使用arx2012的向導,也就是第二個向導,同樣需要修改 Autodesk.arx-2012.props 這個檔案.方法一樣,路徑改為arx2012的sdk路徑即可。


友情提示:
使用vs2012+Arx2015向導,和在vs2010上使用的arx2012向導生成的項目有些不同,包含目錄和庫目錄可以不用修改,項目建立成功後,如果是cad2015arx項目就能直接編譯,無需更改配置。
如果是需要其他版本的arx,也可以和vs2010一樣,修改平台集,再修改成相應版本的包含目錄和庫目錄。


附:這裡貼上Autodesk.arx-2015.props的修改後的詳細内容,可以對比參考。


<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


<!-- http://msdn.microsoft.com/en-us/library/ms171458.aspx -->
<PropertyGroup>
<_ProjectFileVersion>20.0.0.1</_ProjectFileVersion>
<_PropertySheetDisplayName>ObjectARX 2015</_PropertySheetDisplayName>
</PropertyGroup>

<PropertyGroup>
<AcadDir Condition="'$(Platform)'=='x64'">C:\Program Files\Autodesk\AutoCAD 2015\</AcadDir>
<AcadDir Condition="'$(Platform)'=='Win32'">C:\Program Files\Autodesk\AutoCAD 2015\</AcadDir>
<AcadExe Condition="'$(ArxAppType)'=='dbx' or '$(ArxAppType)'=='dbxnet' or '$(ArxAppType)'=='arx' or '$(ArxAppType)'=='arxnet'">acad.exe</AcadExe>
<AcadExe Condition="'$(ArxAppType)'=='crx' or '$(ArxAppType)'=='crxnet'">accoreconsole.exe</AcadExe>
<ArxSdkDir>C:\ObjectARX 2015\</ArxSdkDir>


<ArxSdkIncs Condition="'$(Platform)'=='Win32'">$(ArxSdkDir)\inc;$(ArxSdkDir)\inc-win32</ArxSdkIncs>
<ArxSdkIncs Condition="'$(Platform)'=='x64'">$(ArxSdkDir)\inc;$(ArxSdkDir)\inc-x64</ArxSdkIncs>
<ArxHlrIncs>$(ArxSdkDir)\utils\HlrApi\inc</ArxHlrIncs>
<ArxAmodelerIncs>$(ArxSdkDir)\utils\amodeler\inc</ArxAmodelerIncs>
<ArxBrepIncs>$(ArxSdkDir)\utils\brep\inc</ArxBrepIncs>
<ArxAtilIncs>$(ArxSdkDir)\utils\Atil\Inc</ArxAtilIncs>


<ArxSdkLibs Condition="'$(Platform)'=='Win32'">$(ArxSdkDir)\lib-win32</ArxSdkLibs>
<ArxSdkLibs Condition="'$(Platform)'=='x64'">$(ArxSdkDir)\lib-x64</ArxSdkLibs>
<ArxHlrLibs>$(ArxSdkDir)\utils\HlrApi\lib-$(Platform)</ArxHlrLibs>
<ArxAmodelerLibs>$(ArxSdkDir)\utils\amodeler\lib-$(Platform)</ArxAmodelerLibs>
<ArxBrepLibs>$(ArxSdkDir)\utils\brep\lib-$(Platform)</ArxBrepLibs>
<ArxAtilLibs>$(ArxSdkDir)\utils\Atil\Lib-$(Platform)</ArxAtilLibs>
<ArxSDKVersion>20.0</ArxSDKVersion>
<ArxSDKPlatform>v110</ArxSDKPlatform>
</PropertyGroup>


<ImportGroup Label="PropertySheets">
<Import Condition="'$(ArxAppType)'=='dbx' or '$(ArxAppType)'=='dbxnet'" Project="$(ArxSdkDir)\inc\dbx.props" />
<Import Condition="'$(ArxAppType)'=='crx' or '$(ArxAppType)'=='crxnet'" Project="$(ArxSdkDir)\inc\crx.props" />
<Import Condition="'$(ArxAppType)'=='arx' or '$(ArxAppType)'=='arxnet'" Project="$(ArxSdkDir)\inc\arx.props" />
<Import Condition="'$(Configuration)'=='Release'" Project="$(ArxSdkDir)\inc\rxsdk_Releasecfg.props" />
<Import Condition="'$(Configuration)'=='Debug'" Project="$(ArxSdkDir)\inc\rxsdk_Debugcfg.props" />
<Import Condition="'$(ArxAppType)'=='dbxnet' or '$(ArxAppType)'=='crxnet' or '$(ArxAppType)'=='arxnet'" Project="Autodesk.arx-2015-net.props" />
</ImportGroup>

<PropertyGroup>
<!-- ExecutablePath>$(ExecutablePath)</ExecutablePath -->
<IncludePath>$(ArxSdkIncs);$(ArxHlrIncs);$(ArxAmodelerIncs);$(ArxBrepIncs);$(ArxAtilIncs);$(IncludePath)</IncludePath>
<ReferencePath>$(ArxSdkIncs);$(ReferencePath)</ReferencePath>
<LibraryPath>$(ArxSdkLibs);$(ArxHlrLibs);$(ArxAmodelerLibs);$(ArxBrepLibs);$(ArxLibIncs);$(LibraryPath)</LibraryPath>
<!-- SourcePath>$(SourcePath)</SourcePath -->
<!-- ExcludePath>$(ExcludePath)</ExcludePath -->
</PropertyGroup>

<PropertyGroup>
<!-- Local Windows debugger -->
<LocalDebuggerDebuggerType>Auto</LocalDebuggerDebuggerType>
<!-- LocalDebuggerCommand is defined into an empty $(TargetPath) for the property page, it is later redefined to its proper value. -->
<LocalDebuggerCommand>$(AcadDir)$(AcadExe)</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(ProjectDir)</LocalDebuggerWorkingDirectory>
<!-- LocalDebuggerMergeEnvironment>true</LocalDebuggerMergeEnvironment -->
<!-- LocalDebuggerAttach>False</LocalDebuggerAttach -->
<!-- LocalDebuggerSQLDebugging>False</LocalDebuggerSQLDebugging -->
</PropertyGroup>

<ItemDefinitionGroup>
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TypeLibraryName>$(IntDir)$(TargetName).tlb</TypeLibraryName>
<HeaderFileName>%(Filename)_i.h</HeaderFileName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions Condition="'$(ArxAppType)'=='dbx' or '$(ArxAppType)'=='dbxnet'">_DBXAPP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(ArxAppType)'=='crx' or '$(ArxAppType)'=='crxnet'">_CRXAPP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(ArxAppType)'=='arx' or '$(ArxAppType)'=='arxnet'">_ACRXAPP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>$(ArxSdkDir)\inc-$(Platform);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TargetMachine Condition="'$(Platform)'=='Win32'">MachineX86</TargetMachine>
<TargetMachine Condition="'$(Platform)'=='x64'">MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>

</Project>
           

ARX Wizard 2013 won't load into VC2010

 (2013-10-09 11:23:47)

Win10或Win8下ObjectARX* Wizard向導建立項目失敗解決方法

轉載▼

there is 2 things to notice about the 2013 verison:

First, all wizards are now either Application Wizards or Class Wizards. I.e. File->New Project or Project->Add Class

Second, there is no more ARX AddIn Toolbar - the 2 left over functionality we had in the 2012 version aren't anymore truely useful as there is 3rd party tools which do a better work. Instead, we removed the toolbar and documented the command macro in code and in the ObjectARX Help. Generate a new project and you'll see the comments and command code.

About the issue with the MFC dialog, this is a bug. It seems the classID in the HTML file wasn’t updated for the VS2010 version. To solve the problem:

  Go in ‘C:\Program Files (x86)\Autodesk\ObjectARX 2013 Wizards\ArxWizMFCSupport\HTML\1033’

  Rename default.htm to default2008.htm and rename default2010.htm to default.htm that should be it.