Wipeouts to closed polylines

Discussion in 'AutoCAD' started by canon, Jan 17, 2005.

  1. canon

    canon Guest

    Does anyone have a lisp routine that can transform a text mask and/or wipeout to a closed polyline?
     
    canon, Jan 17, 2005
    #1
  2. canon

    TCEBob Guest

    Turn on wipeout visibility with WIPEOUT/FRAMES then use the boundary command.
    Best if you don't have any crossing lines. You could copy the wipeout to a blank
    region and then make it a pline.

    rs
     
    TCEBob, Jan 17, 2005
    #2
  3. canon

    canon Guest

    TCE Bob

    Thanks for the suggestions. When you say copy the wipeout to a blank region of the screen then make it a pline you mean make a boundary around the wipeout with object type-polyline right? I can see how this would work for wipeouts but our textmasks are grouped with the mtext so I'm not sure how I would extract the text mask and move it over.

    Thats why I was hoping that someone would have a lisp that would remove wipeouts/text masks and replace them with polylines. Reason being that some of our clients do not have wipeout capabilities and so if they request the drawings we have to go back find all the wipeouts (which is quite a bit) and trim out all the polylines behind the text and wipeout regions. A lisp would also be a safeguard because then we would know ok we got all the wipeouts the drawings will print out properly for the client.

    If anyone is wondering I'm using Autocad 2002 with express tools V1-9, Windows XP, thanks in advance.

    Canon
     
    canon, Jan 18, 2005
    #3
  4. canon

    OLD-CADaver Guest

    <<but our textmasks are grouped with the mtext so I'm not sure how I would extract the text mask and move it ove>>

    Turn GROUP selection off in OPTIONS->SELECTION->SELECTION MODES
     
    OLD-CADaver, Jan 18, 2005
    #4
  5. canon

    TCEBob Guest

    Like he said. Or set pickstyle = 0. I have a quick macro to do that:

    (defun c:pk() ;toggle pickstyle
    (setvar "pickstyle" (- 1 (getvar "pickstyle")))
    (princ (strcat "\nPickstyle is " (itoa(getvar "pickstyle"))))
    (princ))

    I will work up a routine for you (I hope). Boy, do I hate to cut holes in the
    linework. Is there an object enabler that will help your clients?

    rs
     
    TCEBob, Jan 18, 2005
    #5
  6. canon

    Fatty Guest

    ;May be this helps you:

    (defun conapp (lst)
    (cond ((null (cdr lst)) nil)
    (T (cons (list (car lst)(cadr lst) 0.0)
    (conapp (cddr lst))))))

    (defun leng (en / obj len)
    (setq obj (vlax-ename->vla-object en)
    len (vlax-curve-getDistAtParam obj
    (vlax-curve-getEndParam obj))))

    (defun divpts (len segm / num lst)
    (setq num (fix (/ len segm)))
    (setq cnt 0)
    (while (<= cnt num)
    (setq tmp (* cnt segm))
    (setq lst (append lst (list tmp)))
    (setq cnt (1+ cnt)))
    (setq delta (- len (last lst)))
    (if (/= delta 0.)
    (setq lst (append lst (list (+ (last lst) delta))))
    lst))

    (vl-load-com)

    (defun C:wipcloud ()
    (setq oldos (getvar "OSMODE"))
    (setq oldcmd (getvar "CMDECHO"))
    (setvar "OSMODE" 0)
    (setvar "CMDECHO" 0)

    (setq adoc
    (vla-get-activedocument
    (vlax-get-acad-object))
    mdsp (vla-get-modelspace adoc)
    appd (vla-get-application adoc))
    (vla-zoomextents appd)
    (setq pt_list nil vtx nil nabor nil lsobj nil)
    (setq en (car (entsel "\nSelect closed pline : >>> ")))
    (setq pobj (vlax-ename->vla-object en))
    (setq vtx (vlax-safearray->list
    (vlax-variant-value
    (vla-get-coordinates pobj))))
    (setq vtx (conapp vtx))

    (setq pt_list (mapcar (function (lambda (x)
    (vlax-curve-getpointatdist pobj x)))
    (divpts (leng en) 200.)))
    (mapcar (function (lambda (x y)(progn
    (vl-cmdf "arc" x "e" y "a" -180. ""))))
    pt_list (cdr pt_list))

    (vla-delete pobj)
    (vla-zoomextents appd)
    (vla-regen adoc acActiveViewport)
    (gc)
    (setvar "OSMODE" oldos)
    (setvar "CMDECHO" oldcmd)
    (princ))
    (C:wipcloud)
    (princ)
     
    Fatty, Jan 23, 2005
    #6
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.