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

Discuss and ask questions about CADEditorX and XML API.

Moderators: admin, support, SDS

Post Reply
uni016
Posts: 8
Joined: 30 Nov 2015, 07:21

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

Post by uni016 » 30 Nov 2015, 08:16

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?

support
Posts: 2794
Joined: 30 Mar 2005, 11:36
Contact:

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

Post by support » 30 Nov 2015, 21:47

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply