Reloading linetypes via VBA

Discussion in 'AutoCAD' started by Tony Burba, Aug 26, 2004.

  1. Tony Burba

    Tony Burba Guest

    Anyone know how to reload a linetype that's already present in the drawing?

    I have a large number of files with defective linetype definitions (never
    mind why - my own stupidity, mainly) and I'd like to use DBX to repair them.
    But the "load" method for the linetypes object fails if the linetype already
    exists in the drawing. I tried deleting the linetype, then reloading it, but
    of course the deletion fails if the linetype is referenced by a layer.
     
    Tony Burba, Aug 26, 2004
    #1
  2. Well since the linetype can't be removed because it is referenced, iterate
    thru the layer collection and add all the layers with the defective
    linetype attached to your own collection. Cycle thru your collection and
    change the linetype to something else. Purge the defective linetype, reload
    the good one and re-apply it to the ones you're tracking in your
    collection.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Aug 26, 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.