Extract annotations using API's

Hi,

I would like to extract all types of annotations from a drawing, including geometric tolerance, and display it in an outside document as a list.

I thought of separating the job into 2:

  1. Extracting all the annotation data into an XML.
  2. Displaying the xml using a MS Word document.

There seem to be a problem with that: Some geometric tolerances contain certain symbols that I could not find in any known font. This also means that if I use a word document I have to create my own font?!

Can anyone comment on this solution. Maybe suggest a better idea and a better architecture.

Do you have an idea on how to solve the problem of displaying the special symbols.

Thanks

Reply to
Howard
Loading thread data ...

Howard wrote

Excellent idea. Check

formatting link
for a proposal for a cad xml format. You'll find the writecadml.swp macro for solidworks which would be a good start for your project.

..or an object that can be imported in a Word document, such as an image.

AFAIK, symbols are defined by a Skecth in a BlockDefinition (but I couldn't find the API to retrieve the block from the note obkect...) Anyway, symbols are sketches, not characters of a font. I'd therefore advise to use SVG (scalar vector graphics), a "standard" XML format for graphics

formatting link
which will let you convert your SVG into a picture that can be inserted in Word using Batik
formatting link
or other similar tools. In fact, I'm considering modifying cadML to export sketches as SVG, so I might give you a hand about this. (my problem is to integrate dimensions and constraints cleanly, but this isn't a problem for your symbols) You should consider generate an HTML document rather than a Word doc, with the following advantages:

1) you can view it on a simple browser, on an intranet 2) you could integrate an SVG viewer on the doc easily 3) it is easier to generate 4) you can read it in Word anyway if needed contact me at philippeATcadmlDOTorg if you want help about cadML Philippe Guglielmetti -
formatting link
Reply to
Philippe Guglielmetti

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.