JSON - Dynamic Modification of Title Blocks in Output
Online Demo Link
This CADViewer sample uses the Url parameter interface to pass over the drawing to display, as well as the location of a JSON file which is used to modify the Drawings Title Block information when printing to PDF.
The URL parameter call is (the Url and exact file-paths will change depending on the implementation platform):
Please see Load Parameters from URL on the internal API call to retrive the URL parameters.
The sample drawings consists of a base drawing base_xref_json.dwg which in turn loads in two external references ( Xref’s) , where the Xref’s are placed in the same server folder as the base drawing.
AutoXchange 2020 includes the feature to dynamically modify Block Attributes when performing a conversion operation on a given drawing.
The drawing in this sample has a Title Block, TTLB-ANNO defined, which contains multiple entries. The first three block attributes are TITLE1, TITLE2 and TITLE3.
We therefore pass over a JSON file to AutoXchange 2020 to modify the three Title Block entries as part of a Print to PDF Operation in CADViewer.
The syntax of the JSON file TitleBlock-helloworld.json is:
Choose the following settings for CADViewer Print Modal and Print:
In Adobe Acrobat, zoom into the PDF Output to verify the Title Block content has been dynamically changed:
The Source file for CADViewer_json_610.html is:
Please visit our comprehensive Online CADViewer Demos section other File Demos with CADViewer 4.1 and AutoXchange 2020