API Guru's.... Has anyone written a macro that

Discussion in 'SolidWorks' started by dvanzile, Sep 7, 2004.

  1. dvanzile

    dvanzile Guest

    Has anyone written a macro that extracts all dimensions and/or
    GD&T from a drawing and puts them to a text/excel file?

    Thanks,
    Don Van Zile
    Norgren Automotive
     
    dvanzile, Sep 7, 2004
    #1
  2. I have a subroutine that does most of it... here's the important part:

    Dim ATW_DrawingDoc As SldWorks.DrawingDoc
    ATW_DrawingDoc = swApp.ActiveDoc
    ATW_DrawingDoc.InsertModelAnnotations2(0, False, 32776, True,
    True, False)
    'ATW_ModelDoc2.InsertModelDimensions(0)
    ATW_DisplayDimension = ATW_View1.GetFirstDisplayDimension3()
    Do Until ATW_DisplayDimension Is Nothing

    If
    ATW_DisplayDimension.GetText(SwConst.swDimensionTextParts_e.swDimensionTextC
    alloutAbove) <> "FID" Then
    Dim i_Annotation As SldWorks.Annotation
    i_Annotation = ATW_DisplayDimension.GetAnnotation
    boolstatus = i_Annotation.Select2(False, 1)
    ATW_ModelDoc2.HideDimension()
    Else

    ATW_DisplayDimension.SetText(SwConst.swDimensionTextParts_e.swDimensionTextC
    alloutAbove, "")
    End If
    ATW_DisplayDimension = ATW_DisplayDimension.GetNext4()
    Loop
     
    Evan T. Basalik, Sep 8, 2004
    #2
  3. dvanzile

    Idandan Guest

    I have something like this.
    Is this is your correct email address? I was trying to send it to you
    but it seems there's a problem.
     
    Idandan, Sep 8, 2004
    #3
  4. dvanzile

    Ken Maren Guest

    Ken Maren, Sep 8, 2004
    #4
  5. dvanzile

    dvanzile Guest

    Thanks for your help. I will try to make this work.
    Is there anything in this group that doesn't get a
    response?
     
    dvanzile, Sep 8, 2004
    #5
  6. dvanzile

    dvanzile Guest

    Sadly, I had to get my email changed because of all the spam
    I was getting at work. I have to believe it was from having
    it posted here several times. Big oops on my part. I just sent
    you an e-mail that should have my correct sending address.
    Of course, that's if you use that yahoo account.

    If you don't read it, my new email is the same, just with a '3'
    on the end of 'dvanzile' So it would be dvanzile3@....... you
    know the rest.

    Thanks for any help on this!!!!
     
    dvanzile, Sep 8, 2004
    #6
  7. Yes, sometimes there will be no response. But, I believe it's not because
    nobody cares, but rather that nobody has any idea about how to answer it.
    In some cases, more information is needed to even attempt an answer, and
    that request is usually put forth. But sometimes the question seems
    straight-forward enough to be clear, but there is no answer to the question.
    Personally, sometimes I'm here scratching my head thinking, "I don't have a
    clue - hopefully someone does." And sometimes, if a question sits
    unanswered for a while, someone will step in with the obvious (by then) -
    "We don't have a clue!" So, if you have a thought, spit it out - that way
    the question won't appear to be ignored.

    WT
     
    Wayne Tiffany, Sep 8, 2004
    #7
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.