How to work with commands with dialogs: open, save, findtext, etc

  XML_API > CAD XML API Reference > How To >

How to work with commands with dialogs: open, save, findtext, etc

Previous pageReturn to chapter overviewNext page

Question:  how to work with commands with dialogs: open, save, findtext, etc.,  automatically, without user dialog?

Answer:

In order to call commands:

open, save, saveas, findtext

with parameters without user dialog it is necessary to set flag  filedia to 0.

Command

filedia 0 - dialogs will not appear

filedia 1 - dialogs will be shown

 

It is recommended to return parameter filedia to 1 after handling the needed command automatically.

 

<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
    <!-- Save as PNG: save Filename.png Width Height Bitperpixel[default = 24] -->
  <command text="filedia 0">
  <command text="save &quot;C:\Users\User\Documents\Image1.png&quot; 200 100"/>
  <command text="filedia 1">
</cadsofttools>

 

Go to ABViewer