Run this in all dwg's ? How?

Discussion in 'AutoCAD' started by mnelson, May 20, 2004.

  1. mnelson

    mnelson Guest

    Anyway to make this run in a script? I have a open & close script that calls this, but does not work. I need to run this on all dwg’s. Any good ideas on how to best to this. I’ve tried many things w/o good results.

    ;;; The following routine is used to convert old style
    ;;; polylines (release 13 or previous) to LWpolylines
    ;;; on the RM* (all room polyline) layers.

    (defun C:pLCONVERT (/ CTM CLA)
    (setq CTM (getvar "tilemode"))
    (setq CLA (getvar "clayer"))
    (setvar "tilemode" 1)
    (setvar "plinetype" 2)
    (command "layer" "a" "s" "$PLconvert" "" "" "")
    (command "layer" "s" "0" "f" "*" "t" "rm*" "")
    (command "convert" "p" "all" "")
    ;(command "layer" "a" "r" "$PLconvert" "d" "$PLconvert" "" "")
    (command "layer" "a" "r" "$PLconvert" "" "")
    ;(command "regen")
    (setvar "clayer" CLA)
    (setvar "tilemode" CTM)
    (princ "\n ")
    (princ "\n Room polylines have been converted to LWpolylines")
    (princ)
    )
     
    mnelson, May 20, 2004
    #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.