Author Topic: The next questions about PackageContents.xml structure  (Read 2706 times)

0 Members and 1 Guest are viewing this topic.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
The next questions about PackageContents.xml structure
« on: November 07, 2012, 02:00:53 AM »
My question is about PackageContents.xml.
On this page wrote:
Quote
You can specify more than one 'Command' element as needed.
But what about a 'Commands' element (it is parent for 'Command' element)? Can I specify more than one 'Commands' element as needed?

P.S. In the old version of registration (through the register), we could create many groups. For each group we could to assign both - a global, and a local names (like for command items). How about it in AutoCAD Exchange? Documentation doesn't contain information on it.

I have asked this question in ADN, but it is very long way... Probably here I will receive the response quicker.

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: The next questions about PackageContents.xml structure
« Reply #1 on: November 07, 2012, 07:47:12 AM »
You shouldn't need more than one <Commands> element.  You can list multiple <Command> elements under it and each <Command> can have a "Local" and a "Global" attribute.
Revit 2019, AMEP 2019 64bit Win 10

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: The next questions about PackageContents.xml structure
« Reply #2 on: November 07, 2012, 07:51:45 AM »
You can list multiple <Command> elements under it and each <Command> can have a "Local" and a "Global" attribute.
I know it. My answer not about it.
You shouldn't need more than one <Commands> element.
Your answer is incorrect. Just now I received the response from ADN.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: The next questions about PackageContents.xml structure
« Reply #3 on: November 07, 2012, 08:21:38 AM »
I have wrote API for working with PackageContents.xml file (read/write). I wanted to publish an example code and results, but this forum turns all localized characters into awful porridge. :(

Look attached file.

P.S. API allow to get detailed info about all installed AutoCAD versions and their service packs on local, or network machine. It also allow to iterate, and to manage settings of autoloading for:

Old method of autoload:
1. HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R<CoreVersion>\ACAD-<ProductCode>:<LocalizationCode>\Applications\<ApplicationName>.
2. HKEY_CURRENT_USER\SOFTWARE\Autodesk\AutoCAD\R<CoreVersion>\ACAD-<ProductCode>:<LocalizationCode>\Applications\<ApplicationName>.
3. HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R<CoreVersion>\ACAD-<ProductCode>:<LocalizationCode>\Profiles\<ProfileName>\Dialogs\Appload\Startup.
New method of autoload:
4. Bundles from %ProgramFiles%\Autodesk\ApplicationPlugins\<BundleDirectory>\PackageContents.xml.
5. Bundles from %AppData%\Autodesk\ApplicationPlugins\<BundleDirectory>\PackageContents.xml.

Soon I will finish to write unit tests, and I will write documentation.
« Last Edit: November 07, 2012, 01:33:07 PM by Andrey »

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: The next questions about PackageContents.xml structure
« Reply #4 on: November 07, 2012, 12:56:15 PM »
Andrey, did you get an answer to having multiple "GroupName"?  Your attached example doesn't show an answer to the question you asked.
Revit 2019, AMEP 2019 64bit Win 10

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: The next questions about PackageContents.xml structure
« Reply #5 on: November 07, 2012, 01:23:04 PM »
Andrey, did you get an answer to having multiple "GroupName"?  Your attached example doesn't show an answer to the question you asked.
Hello MexicanCustard,
I have asked about 'Commands' element count. It can be any count (more than one, if it is necessary).
I have asked and about 'GroupName' in the same 'case', but I don't get answer still:
Quote
In the old version of registration (through the register), we could create many groups. For each group we could to assign both - a global, and a local names (like for command items). How about it in AutoCAD Exchange? Documentation doesn't contain information on it.
The structure of PackageContents.xml is bad. Theme of localization was solved very horrible. Official documentation about PackageContents.xml file is not full, and contains errors. Autodesk has not XSD scheme for its file. Autoloader of AutoCAD 2013 SP1.1 contains bugs. I know more defects, but it is forbidden for me - to write about it. It will resolved for me, when officially release AutoCAD 2014.

I have asked about current structure of PackageContents.xml here, and Michael Kay(!!!) took answer to me.

P.S. I updated my attached file: I inattentively copied a CS code
« Last Edit: November 07, 2012, 01:39:46 PM by Andrey »