Author Topic: PackageContents.xml help for ToolPalette.bundle  (Read 3694 times)

0 Members and 1 Guest are viewing this topic.

ROBBO

  • Bull Frog
  • Posts: 217
PackageContents.xml help for ToolPalette.bundle
« on: September 25, 2014, 07:20:00 AM »
Hello,

I have a toolpalette.bundle which inserts custom blocks from a drawing in the Support path of the .bundle. Although the palette and icons display correctly the blocks are not found, as per error below:

Source drawing ".\Support\Steel Sections.dwg" for block "Circular Hollow Section" not found.

What do I need to add to the PackageContents.xml below to enale the blocks to be found in the dwg?

<Components>
    <RuntimeRequirements OS="Win64|Win32" Platform="AutoCAD*" SeriesMin="R19.1" SeriesMax="R19.1" ToolPalettePath="./Contents/"/>
  </Components>
</ApplicationPackage>

Any guidance would be much appreciated,

Kind regards, Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #1 on: September 25, 2014, 09:46:10 AM »
Hello,

I have a toolpalette.bundle which inserts custom blocks from a drawing in the Support path of the .bundle. Although the palette and icons display correctly the blocks are not found, as per error below:

Source drawing ".\Support\Steel Sections.dwg" for block "Circular Hollow Section" not found.

What do I need to add to the PackageContents.xml below to enale the blocks to be found in the dwg?

Code - XML: [Select]
  1. <!-- ... -->
  2.   <Components>
  3.     <RuntimeRequirements OS="Win64|Win32" Platform="AutoCAD*" SeriesMin="R19.1" SeriesMax="R19.1" ToolPalettePath="./Contents/"/>
  4.   </Components>
  5. </ApplicationPackage>
  6.  

Any guidance would be much appreciated,

Kind regards, Robbo.

You need to specify the path(s) where the blocks are located using the SupportPath XmlAttribute within the RuntimeRequirements XmlNode... Assuming ToolPalette.bundle\Contents\Support\ is where your blocks are:

Code - XML: [Select]
  1. <!-- ... -->
  2.   <Components>
  3.     <RuntimeRequirements OS="Win64|Win32" Platform="AutoCAD*" SeriesMax="R19.1"  SeriesMin="R19.1" SupportPath="./Contents/Support" ToolPalettePath="./Contents/"/>
  4.   </Components>
  5. </ApplicationPackage>
  6.  

Cheers
« Last Edit: September 25, 2014, 09:50:21 AM by BlackBox »
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #2 on: September 25, 2014, 10:10:38 AM »
Again BB,

Many thanks for your reply. Still cannot get the blocks to insert.

I have zipped attached the .bundle if you wish to review.

Kindest regards, Robbo.

UPDATE: As highlighted by BB - complete .bundle zipped in post below.
« Last Edit: September 26, 2014, 01:55:19 AM by ROBBO »
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #3 on: September 25, 2014, 12:04:13 PM »
Again BB,

Many thanks for your reply. Still cannot get the blocks to insert.

I have zipped attached the .bundle if you wish to review.

Kindest regards, Robbo.

The only thing in the .ZIP file is an .ATC file?  :angel:
"How we think determines what we do, and what we do determines what we get."

BlackBox

  • King Gator
  • Posts: 3770
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #4 on: September 25, 2014, 01:27:53 PM »
It appears that the ToolPalettePath XmlAttribute also accepts semicolon separated strings (for multiple paths); perhaps adding SupportPath XmlAttribute is not needed. *not sure*
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #5 on: September 26, 2014, 01:53:43 AM »
Apologies BB. Thank you for your efforts.

.bundle zip file reattached with full contents below:

Many thanks, Robbo.
« Last Edit: September 26, 2014, 02:04:23 AM by ROBBO »
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #6 on: September 26, 2014, 08:15:18 AM »
Apologies BB. Thank you for your efforts.

.bundle zip file reattached with full contents below:

Many thanks, Robbo.

Got it working using this for PackageContents.xml file:

Code - XML: [Select]
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ApplicationPackage
  3.         SchemaVersion="1.0" AutodeskProduct="AutoCAD" Name="IRR-SteelSectionsToolPalette" Description="Steel Sections ToolPalette" AppVersion="1.0.0" ProductType="Application" AppNameSpace="" Author="Robbo" ProductCode="{3DC11CE4-CF92-45A0-B123-D566E691AB0A}" UpgradeCode="{42E3AEE8-6F93-41F3-AEF0-B9F06E65D22C}">
  4.         <CompanyDetails Name="" Email="ROBBO@TheSwamp.org" />
  5.         <Components>
  6.                 <RuntimeRequirements OS="Win64|Win32" Platform="AutoCAD*"  SeriesMax="R19.1" SeriesMin="R19.1" SupportPath="./Contents/Support" ToolPalettePath="./Contents" />
  7.         </Components>
  8. </ApplicationPackage>
  9.  



It appears that the ToolPalettePath XmlAttribute also accepts semicolon separated strings (for multiple paths); perhaps adding SupportPath XmlAttribute is not needed. *not sure*

Just to clarify, I initially tested this (adding the tool palette path, and the block's location within .bundle to the ToolPalettePath XmlAttribute), and it fails.

More specifically, the tool palette is loaded just fine, but the blocks fails to insert from palette, resulting in the following error:

Code: [Select]
Source drawing "./Contents/Suppport/Steel Sections.dwg" for block "Steel Channel" not found.

I then, removed the block's location from ToolPalettePath XmlAttribute (semicolon separated list), and instead added the block's location to SupportPath XmlAttribute as shown here (above), and all is working well actually.

Cheers
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #7 on: September 30, 2014, 02:25:18 AM »
Thanks for your help BB.

Still no luck. Steel Sections.dwg not found.

Found a workaround. Renaming the path in the atc file from ./Contents/Support/Steel Sections.dwg to %UserProfileFolder%\AppData\Roaming\Autodesk\ApplicationPlugins\IRR-SteelSectionsToolPalette.bundle\Contents\Support\Steel Sections.dwg inserts the blocks.

Br Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #8 on: September 30, 2014, 10:48:25 AM »
Thanks for your help BB.

Still no luck. Steel Sections.dwg not found.

Found a workaround. Renaming the path in the atc file from ./Contents/Support/Steel Sections.dwg to %UserProfileFolder%\AppData\Roaming\Autodesk\ApplicationPlugins\IRR-SteelSectionsToolPalette.bundle\Contents\Support\Steel Sections.dwg inserts the blocks.

Glad you got it sorted, but that is very strange... I just checked the .APC here that was working, and it has the former path.

Also, just as I mentioned in my PM reply to you about this... Instead of %UserProfileFolder%\AppData\Roaming\... you can simply use %AppData%\... for Win7 or newer.

Cheers
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #9 on: September 30, 2014, 10:57:58 AM »
Thanks BlackBox.

It is strange. I do not understand why either. I was aware of the %appdata%, but have had problems before with this in the SFSP in the past, hence the path I have used to be on the safe side - always seems to work.

I must owe you several beers by now!

All the best, Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: PackageContents.xml help for ToolPalette.bundle
« Reply #10 on: September 30, 2014, 11:10:30 AM »
No worries; I'm happy to help.

Cheers



P.S. - Ice cold Erdinger Weissbräu (Hefeweizen) always welcomed. :angel:
"How we think determines what we do, and what we do determines what we get."