Custom Properties by XML files

Custom Properties by XML files

Problem description

Provide a customizable way for users to auto-populate text fields in the drawing such as to support auto-fill of titleblock and the like.  The process should be customizable without the need to write code.  Also, it needs to support both User specific and Organizational settings.  For example, a User specific might be the user’s name.  Organizational specific might be the Company name or the name of the Division.  The User specific should be under the control of the User, but the Organizational settings should be a shared common data-source.

 

description of solution

Make use of the existing Linked Page-text feature that allows Page-text to pull its string from Custom Properties. Enhance the IRONCAD product to use a set of customizable configuration files to specify what values to use to populate the drawing’s Custom Properties. For example, user might modify all the corporate drawing templates to use two separate page text objects, each linked to its own custom property.

The drawing template’s document Properties would contain these custom properties.

When the template is used to create a new drawing or by explicit command by the user, IRONCAD will read the values for these custom properties from special configuration files. We envision that two files would be used: User_Custom_Properties_Config file and the Common_Custom_Properties_Config file (actual name of files may differ in final implementation). IRONCAD will look first in one of these files for a default value for the Custom Property, and if the custom property is not listed in that file, it will look in the other config file. The user would specify which (User or Common) file should take precedence. In this way, we would be able to support both defaults that are shared across an organization (such as the Company Name) as well as unique to each user (Author name).

Options added to Tools Options pages under the Technical Drawing page.

 

The configuration file will use a simple XML format shown below.  Each “Add” line is a Name-Value pair defining a custom property.  In the example below, the name of the first custom property is “Designer” and the value is “Czarne Fooboo”.  Currently, only string values are supported.

 

<?xml version="1.0" encoding="utf-8"?>

<TechDrawing>

      <CustomProperties>

            <Add Name="Designer" Value="Czarne Fooboo"/>

            <Add Name="Division" Value="Area 51"/>

      </CustomProperties>

</TechDrawing>

 

The rule for handling same custom property located in both the Common and User configuration file is that the User wins (since it is the most specific of the two).

    • Related Articles

    • IronCAD Fastener and Custom Holes Tools Unit Settings

      Have you ever wondered how to get the IronCAD Addon Tools such as Fastener and Custom Holes to display Metric units by default?   The secret is in your Locale! You need to set your Windows Control Panel, Region and Language, Administrative System ...
    • Transferring keyboard shortcuts from one version to the next

      1. Copy the XML file(s) from C:\Users\%USERNAME%\AppData\Local\IronCAD\IRONCAD\20.0\Customization to C:\Users\%USERNAME%\AppData\Local\IronCAD\IRONCAD\21.0\Customization 2. Edit the XML file. 3. Search and replace IRONCAD20 with IRONCAD21 (should be ...
    • How to set a path for custom templates in CAXA Draft

      To set a custom path for CAXA Draft Templates, go to Tools, Options, Path, Template Path, Select the User path, click Modify and select a folder. Then after saving a template or templates to that folder, when you go to New, CAXA Draft and scroll up ...
    • What free utilities are within IronCAD Mechanical

      IronCAD Mechanical provides many tools for designers and engineers but some of you may not know that some basic functionality is available in IronCAD Mechanical even without a license. The following will all work even after the trial license has ...
    • External Link Management with Multiple Users Accessing Files

      Using External Links, the behavior of user collaboration on the file and external files is as follows (without a Data Management System): Example Case: Main.ics is the main scene with an Assembly and two parts under the assembly. Part1.ics and ...