Page 1 of 1

How to save(load) to stream and handling menu buttons?

Posted: 30 Nov 2015, 08:16
by uni016
Hi.
1. How can I save(and load) to memory stream? Is not support?
2. I want handling CadEditorX's menu buttons(Shortcut, Disable/Enable, Visible/Invisible, hint message) and toolbars(disable docking, disable quick customizing) by xml. But I can change only custom buttons. Is it possible?

Re: How to save(load) to stream and handling menu buttons?

Posted: 30 Nov 2015, 21:47
by support
Hello,

1) It is possible to save a current drawing to Base64 format using <save> instruction in the following way:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
  <save>
      <ExportParams Format=".png">
         <Width>1024</Width>
         <Height>-1</Height>
         <Proportional>True</Proportional>
         <BitPerPixel>24</BitPerPixel>
         <MeasureInPixels>True</MeasureInPixels>
      </ExportParams>
  </save>
</cadsofttools>
Notice that the Filename attribute is purposely omitted in the <ExportParams> node to save to the Base64 format. Loading from the stream is not supported, you can load a drawing from file or URL.

2) Unfortunately, it is not possible to customize the standard toolbar buttons. You can show/hide only specific toolbars (Tools, CAD Image, etc.), panels (Properties, Explorer, Favorites, Structure) or the whole tabs (Viewer, Editor, etc.).


Mikhail