TheSwamp

CAD Forums => CAD General => Topic started by: ROBBO on September 25, 2014, 07:20:00 AM

Title: PackageContents.xml help for ToolPalette.bundle
Post by: ROBBO 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.
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: BlackBox 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
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: ROBBO 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.
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: BlackBox 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:
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: BlackBox 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*
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: ROBBO 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.
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: BlackBox 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
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: ROBBO 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.
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: BlackBox 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
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: ROBBO 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.
Title: Re: PackageContents.xml help for ToolPalette.bundle
Post by: BlackBox 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: