Extract annotations using API's

Discussion in 'SolidWorks' started by Howard, Sep 21, 2004.

  1. Howard

    Howard Guest

    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
     
    Howard, Sep 21, 2004
    #1
  2. Excellent idea. Check www.cadml.org 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 (http://www.w3.org/Graphics/SVG/),
    which will let you convert your SVG into a picture that can be
    inserted in Word using Batik (http://xml.apache.org/batik/) 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 - www.cadml.org
     
    Philippe Guglielmetti, Sep 23, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.