Automatically creating dimenions on Slddrw

Discussion in 'SolidWorks' started by R&E, Mar 2, 2005.

  1. R&E

    R&E Guest

    Hi there,

    I was wondering if anyone knew how to automatically create dimensions on a
    Slddrw using the API? I want all the dimensions that were used to create the
    model.

    I have tried the 'insert model items' but it doesn't display all the
    dimensions - the only way I seem to be able to do it, is by manual
    operation. I want to create a batch operation, so an automatic method would
    be perfect.

    Thanks,

    Emma
     
    R&E, Mar 2, 2005
    #1
  2. There are a couple of ways I can think of. You can use
    DrawingDoc.InsertModelDimensions, which is the insert model items, but
    it has a few options in the API. You could possibly enumerate over all
    features in your part and then call InsertModelDimensions(2) which adds
    all dimensions of the currently selected feature.

    Another way is to add the dimensions programatically with
    AddDimension2, but that would involve selecting the entities to
    dimension (which is a bit of work). The API documentation has an
    example of this in the VB examples. Coupling that with traversing the
    features you could possibly get what you want.

    Jonathan Anderson
     
    Jonathan Anderson, Mar 2, 2005
    #2

  3. Boy, I sure hope you do really simple models! On the kind of stuff that I
    do, bringing in all of the dimensions at once makes a totally unworkable
    mess of a drawing. You should be careful what you wish for.

    Jerry Steiger
    Tripod Data Systems
    "take the garbage out, dear"
     
    Jerry Steiger, Mar 2, 2005
    #3
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.