See the top rated post in this thread. Click here

Results 1 to 3 of 3

Thread: Routine to highlight a Hatch not showing its Area in the Property Palette

  1. #1
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Routine to highlight a Hatch not showing its Area in the Property Palette

    Hi everyone

    Could anybody here help me create a Routine that high lighted a hatch that not show its Area in the Property Palette.

    Thanks in advance.

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    1

    Default Re: Routine to highlight a Hatch not showing its Area in the Property Palette

    Code:
    (vl-load-com)
    
    (defun c:BadHatch (/ *error* acDoc bad ss)
    
      (defun *error* (msg)
        (if ss (vla-delete ss))
        (cond ((not msg))                                                   ; Normal exit
              ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
              ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
        )
        (princ)
      )
      
      (if (ssget "_x" (list '(0 . "HATCH") (cons 410 (getvar 'ctab))))
        (progn
          (setq bad (ssadd))
          (vlax-for	x (setq	ss
    			 (vla-get-activeselectionset
    			   (setq acDoc (vla-get-activedocument
    					 (vlax-get-acad-object)
    				       )
    			   )
    			 )
    		  )
    	(if (vl-catch-all-error-p (vl-catch-all-apply 'vla-get-area (list x)))
    	  (setq bad (ssadd (vlax-vla-object->ename x) bad))
    	)
          )
          (if (< 0 (sslength bad))
    	(sssetfirst nil bad)
    	(prompt "\nNo bad hatches found. \n")
          )
        )
      )
      (*error* nil)
    )
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Re: Routine to highlight a Hatch not showing its Area in the Property Palette

    Thank you so much BlackBox!

    This is exactly what I am asking.

    This will help me a lot.

Similar Threads

  1. Replies: 0
    Last Post: 2018-01-19, 03:31 AM
  2. 2016: Hatch Area Error (Selected object does not have an area)
    By syedshanhaider708501 in forum AutoCAD General
    Replies: 1
    Last Post: 2015-09-10, 12:44 PM
  3. Ability to address the Property Line Area Parameter in a Gross Building Area Schedule
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2013-02-21, 01:11 PM
  4. autocad 14 highlight will not "highlight"
    By ronwater.72872 in forum AutoCAD General
    Replies: 5
    Last Post: 2004-08-09, 02:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •