Make Drawing from Part / View Palette

Discussion in 'SolidWorks' started by Mark, Jan 8, 2007.

  1. Mark

    Mark Guest

    The bullet-point version:

    -How to access "Make Drawing from Part" through the API?
    -If nobody knows how to do that, then my alternative is to try and get
    the same functionality through a series of equivalent commands, for
    which I need to figure out:
    -What is the ID for the View Palette taskpane, and how do I interact
    with it once I've activated it?
    -How do I "preload" a new document with a filename, without actually
    saving it?


    The long version:
    I'm modifying a macro we use to find the drawings associated with a
    part; the macro looks for drawing files named using the part number,
    from a custom property. I'd like to add code so that if no drawing
    exists, the macro will automatically create one. The "file/make
    drawing from part" command does exactly what I want, but I can't find
    any documentation saying how to access it from the API. I've tried
    recording, but all it shows is NewDocument. Since that didn't work, I
    tried to reverse engineer the same functionality (open the View Palette
    taskpane, load views for the part, and give the drawing a tentative
    filename based on the part filename); however, I can't find an ID for
    the View Palette pane, and if I could I wouldn't know how to load a
    part there (recording a macro doesn't show anything happening). I'm
    also not sure how to get the drawing to "preload" with a filename
    derived from the part or some other source. I suspect most of what I
    want can be obtained by making the new drawing associate itself with
    the part somehow but I'm not quite sure how to do that, other than by
    inserting a view (which I don't want the macro to do)...

    Thanks everyone,
    -Mark

    x-posted to SW forums
     
    Mark, Jan 8, 2007
    #1
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.