Jump to content

Recommended Posts

Posted

Hi,

 

I've got a bunch of different routines i use for selecting various types of objects in a job. trying to set one up for selecting all revision clouds but i'm a little unsure how to tweak it. The code below selects all the hatch patterns. was hoping i could simply change "hatch" to "revcloud" but that doesn't seem to work unfortunately. Any help much appreciated!

 

(defun c:ah (/ sel1)
 (setq sel1 (ssget "_x" '((0 . "hatch"))))
 (sssetfirst nil sel1)
 (princ)
)

 

Posted (edited)

all good i worked it out. i thought revclouds was its own specific object but it isnt.. falls under LWPOLYLINE but if you search that it will find every other polyline in your job. Lucky i use clouds in specific layers so was able to search for polylines on those layers only to get them selected. code below for anyone interested

 

(defun c:arev (/ sel1)
 (setq sel1 (ssget "_x" '((0 . "LWPOLYLINE") (-4 . "<or") (8 . "layername1") (8 . "layername2") (8 . "layername3")(-4 . "or>"))))
 (sssetfirst nil sel1)
 (princ)
)

 

Edited by SLW210
Replace Quote Tags with Code Tags!!
Posted

Just a hint

 (setq sel1 (ssget "_x" '((0 . "LWPOLYLINE")  (8 . "layername1,layername2,layername3"))))

 

Over at other forum in later versions of acad there is a class property "Revcloud" will try to find was today.

  • Like 1
Posted

Try this, reveals xdata.

 

(defun c:getXData ( / ename edata )
  (if (setq ename (car (entsel "\nSelect entity to read xdata: ")))
    (progn
      (setq edata (entget ename '("*")))
      (if (setq xdata (cdr (assoc -3 edata)))
        (foreach item xdata
          (print item)
        )
        (princ "\nEntity has no xdata.")
      )
    )
  )
  (princ)
)

 

("RevcloudProps" (1070 . 0) (1040 . 2.5)) 

Posted
4 hours ago, BIGAL said:

Try this, reveals xdata.

 

(defun c:getXData ( / ename edata )
  (if (setq ename (car (entsel "\nSelect entity to read xdata: ")))
    (progn
      (setq edata (entget ename '("*")))
      (if (setq xdata (cdr (assoc -3 edata)))
        (foreach item xdata
          (print item)
        )
        (princ "\nEntity has no xdata.")
      )
    )
  )
  (princ)
)

 

("RevcloudProps" (1070 . 0) (1040 . 2.5)) 

 

i use lee mac's entity list program. i'm assuming it does the same or similar thing.

good to see i went through the correct process when i was trying to work it out myself  😁

Posted
19 hours ago, BIGAL said:

Just a hint

 (setq sel1 (ssget "_x" '((0 . "LWPOLYLINE")  (8 . "layername1,layername2,layername3"))))

 

Over at other forum in later versions of acad there is a class property "Revcloud" will try to find was today.

 

my properties tells me its an actual revcloud. thats what made me think (0 . "REVCLOUD") would work

 

image.png.0c05a2780f00442d3c52cd34473e076d.png

Posted

At top level. Use (entget (car (entsel "\nPick object ")) so if don't see say Revcloud then it may exist at a sub level, dxf 0 is at top level. A Revcloud is like a sub property and the Properties panel reads that sub level if it exists, a good example is attributes.

 

Similar with Dumpit.lsp it does not show "Revcloud" as a property. Dumpall properties does not show revcloud as a property either.

 

So sometimes have to dig a lot deeper, or just ask for help, so many people in the past have helped me with a tricky request.

 

The block has 20 attributes but no sign of it here.

((-1 . <Entity name: 8781e420>) (0 . "INSERT") (5 . "D998") (330 . <Entity name: 7fb611b0>) (100 . "AcDbEntity") (67 . 1) (410 . "D01") (8 . "DRGTEXT") (100 . "AcDbBlockReference") (66 . 1) (2 . "DA1DRTXT") (10 0.0 0.0 0.0) (41 . 1.0) (42 . 1.0) (43 . 1.0) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0))

 

Posted
3 hours ago, masterfal said:

guess im lucky we use a specific layer for revclouds so it seems to select them with no issues..

If "Revcloud" is on a separate layer, you can simply isolate this layer and delete the objects...
But if you want to practice lisp, then good luck...

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...