VB question: replacing parts in drawing.

Discussion in 'SolidWorks' started by Gunnar Olsen, Aug 13, 2003.

  1. Gunnar Olsen

    Gunnar Olsen Guest

    Hi all,

    I've tried to replace a part in a drawing ( file - open - references -
    replace... ) and record it to a macro. It does not work. Is it possible
    to do this with VB programming? and what code should I use?

    All help appreciated, Thanks!

    Regards
    Gunnar Olsen
     
    Gunnar Olsen, Aug 13, 2003
    #1
  2. Gunnar Olsen

    Gunnar Olsen Guest

    Found it!

    dim App as sldworks.sldworks
    set app=createobject("solidworks.application")
    app.ReplaceReferencedDocument("Drawing","OldPartName","NewPartName")
     
    Gunnar Olsen, Aug 13, 2003
    #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.