Jump to content

solid hatch closed areas of drawing


Barry_47

Recommended Posts

I modified it to work with Splines only , try from HERE and let me know . ;)

 

Tharwat, can you please post the earlier version which allowed selection of circles, rectangles, and closed plines ?

 

I intended to save the earlier version, but then you revised to splines selection only.

Thanks, Steve

Link to comment
Share on other sites

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • Barry_47

    14

  • Tharwat

    13

  • ReMark

    4

  • stevesfr

    2

Tharwat, can you please post the earlier version which allowed selection of circles, rectangles, and closed plines ?

 

I intended to save the earlier version, but then you revised to splines selection only.

Thanks, Steve

 

Sure , just replace the following from the routine .

 

(setq ss (ssget "_:L"
                     '((-4 . "<OR")
                       (0 . "CIRCLE,ELLIPSE")
                       (-4 . "<AND")
                       (0 . "LWPOLYLINE")
                       (-4 . "&=")
                       (70 . 1)
                       (-4 . "AND>")
                       (-4 . "OR>")
                      )
              )
     )

Link to comment
Share on other sites

Sure , just replace the following from the routine .

 

(setq ss (ssget "_:L"
'((-4 . "<OR")
(0 . "CIRCLE,ELLIPSE")
(-4 . "<AND")
(0 . "LWPOLYLINE")
(-4 . "&=")
(70 . 1)
(-4 . "AND>")
(-4 . "OR>")
)
)
)

 

Tharwat, thank you much, Steve............... works perfect now

Link to comment
Share on other sites

why cant i see my vport. or del my v port ? wht to do? pls help anyone

 

Barry , when you have a new question that is not related to your or any other thread in the forum , just start a new thread which would allow all users to see and to be a reference to forum for later on search .

 

Anyway , just run the AUDIT command with Yes option and the viewport should be recovered .

Link to comment
Share on other sites

  • 3 weeks later...
i have to write new thread. pls show me the way

 

just run the AUDIT command with Yes option and the viewport should be recovered .

 

Which part that you don't understand from my quoted reply here ?

 

Anyway ;

Open that drawing then type audit at the command line and hit enter then choose yes when you being asked .

 

That's it .

Link to comment
Share on other sites

why cant i see my vport. or del my v port ? wht to do? pls help anyone

 

Can't see vport? The viewport could be on a layer that is off or frozen.

 

Can't delete a vport? The viewport could be on the Defpoints layer and layer "0" is frozen.

Link to comment
Share on other sites

i have to write new thread. pls show me the way

 

Find the appropriate forum (example: AutoCAD Beginners' Area) then click on the big green button that reads +Post New Thread. You can't miss it.

Link to comment
Share on other sites

Dear Tharwat,

Some days before you solved my problem with lisp. SOLID Hatch with its boundry colour. is it possible with in program, in solid hatch done by lisp. will delete its boundry after completion of its action. so if i select all. it will not solid hatch again on done solid hatch. so i will get more memory while doing action of solid hatch.if hatches are dence my autocad get hanged or i get fatal error.

Link to comment
Share on other sites

Dear Tharwat,

Some days before you solved my problem with lisp. SOLID Hatch with its boundry colour. is it possible with in program, in solid hatch done by lisp. will delete its boundry after completion of its action. so if i select all. it will not solid hatch again on done solid hatch. so i will get more memory while doing action of solid hatch.if hatches are dence my autocad get hanged or i get fatal error.

 

Try this UNTESTED modified codes .

(defun c:Test (/ *error* v l ss doc)
 ;;    Tharwat 17. Sep. 2014    ;
 (defun *error* (x)
   (if v
     (mapcar 'setvar '(HPNAME CMDECHO) v)
   )
   (if (wcmatch (strcase x) "*BREAK*,*CANCEL*,*EXIT*")
     (princ (strcat "\n** Error: " x " **"))
   )
 )
 (setq l (entlast)
       v (mapcar 'getvar '(HPNAME CMDECHO))
 )
 (if (setq ss (ssget "_:L" '((0 . "SPLINE"))))
   (progn (mapcar 'setvar '(HPNAME CMDECHO) '("SOLID" 0))
          (vla-startUndomark (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))))
          ((lambda (i / sn c o)
             (while (setq sn (ssname ss (setq i (1+ i))))
               (command "_.-hatch" "S" sn "" "")
               (if (not (eq l (setq o (entlast))))
                 (if (setq c (assoc 62 (entget sn)))
                   (entmod (append (entget o) (list (cons 62 (cdr c)))))
                   (entmod (append (entget o) '((62 . 256))))
                 )
               )
               (entdel sn)
               (setq l o)
               
             )
           )
            -1
          )
          (vla-Endundomark doc)
   )
 )
 (*error* nil)
)(vl-load-com)

Edited by Tharwat
Link to comment
Share on other sites

dear

tharwat

i tried this. its not working as i ask. it work but changes my solid hatch colour to current layer.

i want my solid hatch colour should not change. if it works it is most benificial for me to avoid fatal error too

Link to comment
Share on other sites

dear

tharwat

i tried this. its not working as i ask. it work but changes my solid hatch colour to current layer.

i want my solid hatch colour should not change. if it works it is most benificial for me to avoid fatal error too

 

I modified the codes above in post No# 32 .

Link to comment
Share on other sites

dear tharwat

in post 3948 you made my work easy by greating lisp to close my boundry with solid hatch with its colour. but from today if i tried it is stop working and says object not found.

and it stops working . pls help me in to it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...