Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

APS Design Automation: PackageContents.xml not being read from AppBundle in AutoCAD+25_1

I'm experiencing an issue with APS Design Automation (formerly Forge) where my AppBundle's PackageContents.xml is not being read/processed by AutoCAD Core Console, preventing my custom .NET DLL from loading.

Problem

WorkItems execute scripts successfully but custom commands are not recognized:

Command: _CLOUDEXPORT
Unknown command "CLOUDEXPORT". Press F1 for help.

What's Working:

  • ✅ Script executes (no timeout)
  • ✅ AppBundle loads via /al parameter
  • ✅ DWG file downloads successfully

What's NOT Working:

  • ❌ PackageContents.xml never processed
  • ❌ DLL never loads
  • ❌ Custom commands never registered

Configuration

Engine: Autodesk.AutoCAD+25_1

AppBundle Structure:

AutoCADEntityExporter.bundle/
 PackageContents.xml
 Contents/
 AutoCADEntityReader.dll
 Newtonsoft.Json.dll
 System.Data.SQLite.dll
 x64/SQLite.Interop.dll

PackageContents.xml (simplified to match Autodesk sample):

<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage
 SchemaVersion="1.0"
 Version="1.0"
 ProductCode=""
 Name="AutoCADEntityExporter"
 Description="AutoCAD Entity Export Plugin"
 Author="Acme-Alpha">
 <CompanyDetails
 Name="Acme-Alpha"
 Url="www.example.com"
 Email="[email protected]" />
 <Components>
 <RuntimeRequirements
 OS="Win64"
 Platform="AutoCAD" />
 <ComponentEntry
 AppName="AutoCADEntityExporter"
 ModuleName="./Contents/AutoCADEntityReader.dll"
 AppDescription="AutoCAD Entity Export Plugin"
 LoadOnCommandInvocation="True"
 LoadOnAutoCADStartup="False">
 <Commands GroupName="AcmeCommands">
 <Command Global="CLOUDEXPORT" Local="CLOUDEXPORT" />
 </Commands>
 </ComponentEntry>
 </Components>
</ApplicationPackage>

Activity CommandLine:

$(engine.path)\\accoreconsole.exe /i "$(args[inputDwg].path)" /al "$(appbundles[AcmeExporter1002].path)" /s "$(settings[script].path)"

Script:

_CLOUDEXPORT
QUIT
Y

WorkItem Log Evidence

From WorkItem ID 326e895d59694796973e195fcb1db613:

[10/03/2025 18:36:32] Command line: [ /i "C:\DARoot\Jobs\...\input.dwg" /al "C:\DARoot\Applications\...\AcmeExporter1002[17].package" /s "C:\DARoot\Jobs\...\setting_script.scr"]
[10/03/2025 18:36:33] Command: _CLOUDEXPORT
[10/03/2025 18:36:33] Unknown command "CLOUDEXPORT". Press F1 for help.

Observations:

  • No DLL loading messages in log
  • No PackageContents.xml parsing errors
  • Package path shows correctly in command line
  • Script executes (3 empty "Command:" prompts appear before _CLOUDEXPORT)

Troubleshooting Completed

  1. Compared with Autodesk official sample - Structure matches exactly

  2. Simplified PackageContents.xml - Removed all optional attributes

  3. Tested both load modes:

    • LoadOnCommandInvocation="True" + LoadOnAutoCADStartup="False" → Fails
    • LoadOnCommandInvocation="False" + LoadOnAutoCADStartup="True" → Fails
  4. Verified zip structure - Matches documented format

  5. Attempted engine downgrade - AutoCAD+23/+24 unavailable or deprecated

Questions

  1. Why isn't PackageContents.xml being read from the .package file?

    • The /al parameter loads the package correctly
    • No error messages about XML parsing
  2. Has PackageContents.xml format changed for AutoCAD+25_1?

    • Official sample uses AutoCAD+23 (2017-2018)
    • Are there schema changes for newer engines?
  3. Is there a validation tool for PackageContents.xml?

  4. Should the zip structure be different for AutoCAD+25_1?

Environment

  • API Version: Design Automation API v3 (now Automation API)
  • Region: us-east
  • DLL: .NET Framework 4.7, compiled for AutoCAD 2020+
  • Dependencies: Newtonsoft.Json 13.0.3, System.Data.SQLite 1.0.118

Any guidance would be greatly appreciated!

Answer*

Draft saved
Draft discarded
Cancel
1
  • Yep, this fixed it. Thank you! Would sure be nice if APS ran some kind of validation script on your PackageContents.xml and returned errors in the logging. Commented Oct 7, 2025 at 7:34

lang-cs

AltStyle によって変換されたページ (->オリジナル) /