Is there a way to filter out only entities that are not on frozen layer and
not on off layers?
Is there a way to process through the SS1 enities and check there layers to
see if they are not on and not frozend and then build a SS2 of those
entities?
What is used to determine if a layer is off/on frozen/thawed in LISP without
going into a dialouge box.
Is there a way to table search a layer and check it?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
All too often RTM is used arrogantly and only to be rude, but this is one case
where it is useful. All of your questions can be answered by reading the lisp
manual. For example, set up a drawing with layers named on, off, frozen,
thawed, locked, unlocked, white, red and dashed. Use your dialogue box to set
the feature of each layer according to its name - layer red is "red", layer off
is "off, unlocked and thawed", layer on is "on, unlocked and thawed"....
Now use tablesearch to get each layer's definition and examine the difference.
Modify the def. and entupd it. Be amazed.
JJones
bar...@sce.com wrote:
>
> When filtering with a ssget"x" for certian blocks and building a selection set
> SS1;
> it gets the entites on layers that are off and those that are frozen.
>
> Is there a way to filter out only entities that are not on frozen layer and
> not on off layers?
>
> Is there a way to process through the SS1 enities and check there layers to
> see if they are not on and not frozend and then build a SS2 of those
> entities?
>
> What is used to determine if a layer is off/on frozen/thawed in LISP without
> going into a dialouge box.
>
> Is there a way to table search a layer and check it?
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
***************************************************************
* Dave Hinrichs MCE\ACE\Certified Instructor *
* E-Mail.d...@quannon.com *
* Quannon CAD Systems, Inc. Voice: (612) 935-3367 *
* 6101 Baker Road, Suite 204 FAX: (612) 935-0409 *
* Minnetonka, MN 55345 *
* http://www.quannon.com/ *
* My above address has been altered to prevent spamming *
* remove the _delete_ to make it work. *
***************************************************************
70 is only for frozen/thawed and locked, the off status is in the
color group 62.
so iterate over all entities in the selection set and filter out all
entities which are on OFF or FROZEN layers.
something like: (using faq functions)
(defun entity-visible-p (ele)
(and (zerop (getval 70 (setq tbl (tblsearch "LAYER" (getval 8 ele)))))
(not (minusp (getval 62 tbl)))))
;;; => list of all visible entities
(vl-remove-if-not
'entity-visible-p
(sslist (ssget "X")))
(written from scratch on the vienna airport, not tested)
---
Reini Urban http://xarch.tu-graz.ac.at/home/rurban/
You invent your own, self-aggrandizing AutoLISP
language extensions, for what, other than to make
AutoLISP code run even slower than it already does?
Your posts are very self-serving, and are of little
educational or informational value to most of those
who read them and do not understand that you prefer
to write code examples in "Reini's version of LISP"
rather than AutoLISP.
Take this garbage someplace else.
--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* tony.t...@worldnet.att.net */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/
now we want to know: did you use your laptop and mobile to send it to
this ng?
Cheers ;-)
Bullshit.
The only thing that's arrogant here is your
completely useless response.
If someone must ask a question like this, then
even a butt-head should have enough common sense
to realize that they are probably not going to be
able to easily ferret out the needed information
from the hidious documentation they have.
Try being more constructive and less of a pompus ass.
Here's how you might do it:
; (IsLayerVisible <ldata>)
;
; Given a layer's table data (returned by
; tblsearch/next), return T if the layer is
; both on and thawed, and nil otherwise.
(defun IsLayerVisible (ldata)
(and (not (minusp (assoc 62 ldata))) ;; Not off?
(zerop (logand 1 (cdr (assoc 70 ldata)))) ;; Not frozen?
)
)
;; (MapLayer <Function>)
;;
;; Iterates through the layer table, and applies
;; <Function> to each layer's data, and returns
;; a list of the result returned by each call to
;; <Function>
(defun MapLayer (function / layer rslt)
(while (setq layer (tblnext "layer" (not layer)))
(setq rslt (cons (apply function (list layer)) rslt))
)
(reverse rslt)
)
;; This code uses the functions defined above,
;; to construct a comma-delimited string that
;; contains the names of all layers that are
;; thawed and on:
(setq layers
(substr 2
(apply 'strcat
(MapLayer
'(lambda (layer)
(if (IsLayerVisible layer)
(strcat "," (cdr (assoc 2 layer)))
""
)
)
)
)
)
)
;; Now, use the string in an SSGET filter:
(ssget "x" (list ... (cons 8 layers)...))
bar...@sce.com wrote:
>
> When filtering with a ssget"x" for certian blocks and building a selection set
> SS1;
> it gets the entites on layers that are off and those that are frozen.
>
> Is there a way to filter out only entities that are not on frozen layer and
> not on off layers?
>
> Is there a way to process through the SS1 enities and check there layers to
> see if they are not on and not frozend and then build a SS2 of those
> entities?
>
> What is used to determine if a layer is off/on frozen/thawed in LISP without
> going into a dialouge box.
>
> Is there a way to table search a layer and check it?
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
Reini Urban wrote:
>
> Dave Hinrichs <_delete_d...@quannon.com> wrote:
> : The table data for layers gives the 70 group code to determine the
> : current status of a layer.
>
> 70 is only for frozen/thawed and locked, the off status is in the
> color group 62.
>
> so iterate over all entities in the selection set and filter out all
> entities which are on OFF or FROZEN layers.
> something like: (using faq functions)
>
> (defun entity-visible-p (ele)
> (and (zerop (getval 70 (setq tbl (tblsearch "LAYER" (getval 8 ele)))))
> (not (minusp (getval 62 tbl)))))
> ;;; => list of all visible entities
> (vl-remove-if-not
> 'entity-visible-p
> (sslist (ssget "X")))
>
> (written from scratch on the vienna airport, not tested)
> ---
> Reini Urban http://xarch.tu-graz.ac.at/home/rurban/
--
You can scan the layer table for the names of
layers that are on and thawed, and you can
construct a filter from it, and avoid the
need to manually filter each object.
Reini Urban wrote:
>
> Dave Hinrichs <_delete_d...@quannon.com> wrote:
> : The table data for layers gives the 70 group code to determine the
> : current status of a layer.
>
> 70 is only for frozen/thawed and locked, the off status is in the
> color group 62.
>
> so iterate over all entities in the selection set and filter out all
> entities which are on OFF or FROZEN layers.
> something like: (using faq functions)
>
> (defun entity-visible-p (ele)
> (and (zerop (getval 70 (setq tbl (tblsearch "LAYER" (getval 8 ele)))))
> (not (minusp (getval 62 tbl)))))
> ;;; => list of all visible entities
> (vl-remove-if-not
> 'entity-visible-p
> (sslist (ssget "X")))
>
> (written from scratch on the vienna airport, not tested)
> ---
> Reini Urban http://xarch.tu-graz.ac.at/home/rurban/
--