Author Topic: same solid size select  (Read 3392 times)

0 Members and 1 Guest are viewing this topic.

dussla

  • Bull Frog
  • Posts: 291
same solid size select
« on: December 04, 2011, 09:02:37 PM »
hello , good good freind
always good luck

i meet a problem.
that is solid select.
i made a many solid  , but i have  to select  same  volume solid.
is that possible ?

 
.

BlackBox

  • King Gator
  • Posts: 3770
Re: same solid size select
« Reply #1 on: December 05, 2011, 02:39:46 AM »
I would create a selection set of all solids (if present), and prompt the user to select a single desired solid, then iterate the selection set to identify the similar solids and add them to a new selection set then use sssetfirst function.

HTH
"How we think determines what we do, and what we do determines what we get."

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: same solid size select
« Reply #2 on: December 05, 2011, 05:31:29 AM »
Quick, just like RenderMan proposed :

Code: [Select]
(defun c:solvolsel ( / ss s1 es1a es1 vol sss n es ) (vl-load-com)
  (setq ss (ssget "_X" (list '(0 . "3DSOLID") (cons 410 (getvar 'ctab))) ))
  (setq s1 (ssget "_:E:S:L" (list '(0 . "3DSOLID") (cons 410 (getvar 'ctab))) ))
  (setq es1a (vlax-ename->vla-object (setq es1 (ssname s1 0))))
  (setq vol (vla-get-volume es1a))
  (setq sss (ssadd))
  (repeat (setq n (sslength ss))
    (setq es (ssname ss (setq n (1- n)) ))
    (if (equal (vla-get-volume (vlax-ename->vla-object es)) vol 1e-8) (ssadd es sss) )
  )
  (ssadd es1 sss)
  (sssetfirst nil sss)
  (princ)
)

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

BlackBox

  • King Gator
  • Posts: 3770
Re: same solid size select
« Reply #3 on: December 05, 2011, 09:34:43 AM »
Quick, just like RenderMan proposed :

Cheers, dude. *Tips hat*

Separately, be cautious of this  :wink::

Code: [Select]
_$ (setq s1 (ssget "_:E:S:L" (list '(0 . "3DSOLID") (cons 410 (getvar 'ctab))) ))
_$ <Right Click>
nil
_$
"How we think determines what we do, and what we do determines what we get."

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: same solid size select
« Reply #4 on: December 05, 2011, 11:16:32 AM »
Quick, just like RenderMan proposed :

Cheers, dude. *Tips hat*

Separately, be cautious of this  :wink::

Code: [Select]
_$ (setq s1 (ssget "_:E:S:L" (list '(0 . "3DSOLID") (cons 410 (getvar 'ctab))) ))
_$ <Right Click>
nil
_$
Conditionals?!? We don't need no stinking conditionals!
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: same solid size select
« Reply #5 on: December 05, 2011, 11:39:30 AM »
Quick, just like RenderMan proposed :

Cheers, dude. *Tips hat*

Separately, be cautious of this  :wink::

Code: [Select]
_$ (setq s1 (ssget "_:E:S:L" (list '(0 . "3DSOLID") (cons 410 (getvar 'ctab))) ))
_$ <Right Click>
nil
_$
Conditionals?!? We don't need no stinking conditionals!

Yes, conditionals are there to make sure that picked object is 3DSOLID and have Volume property that is checked later on... And for missing to hit an object I agree, just try again...  :roll:

M.R.
« Last Edit: December 05, 2011, 11:42:35 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: same solid size select
« Reply #6 on: December 05, 2011, 11:41:52 AM »
Quick, just like RenderMan proposed :

Cheers, dude. *Tips hat*

Separately, be cautious of this  :wink::

Code: [Select]
_$ (setq s1 (ssget "_:E:S:L" (list '(0 . "3DSOLID") (cons 410 (getvar 'ctab))) ))
_$ <Right Click>
nil
_$
Conditionals?!? We don't need no stinking conditionals!

Yes, conditionals are there to make sure that picked object is 3DSOLID and have Volume property that is checked later on...

M.R.
RM was referring to the use of cond/and/or/if. I was just being myself. :-P
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

BlackBox

  • King Gator
  • Posts: 3770
Re: same solid size select
« Reply #7 on: December 05, 2011, 12:07:16 PM »
Conditionals?!? We don't need no stinking conditionals!

 :-D

Yes, conditionals are there to make sure that picked object is 3DSOLID and have Volume property that is checked later on... And for missing to hit an object I agree, just try again...  :roll:

Marko, I'm not sure that I understand.... Are the rolling eyes meant to convey that you understand and/or agree, or that you disagree?  :?
"How we think determines what we do, and what we do determines what we get."

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: same solid size select
« Reply #8 on: December 05, 2011, 01:34:51 PM »
I agree Render, just I am little bit lazy to modify myself...
 :roll:
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

BlackBox

  • King Gator
  • Posts: 3770
Re: same solid size select
« Reply #9 on: December 05, 2011, 01:52:31 PM »
I agree Render, just I am little bit lazy to modify myself...
 :roll:

No worries, my friend  :wink:... I can relate.  :lol:
"How we think determines what we do, and what we do determines what we get."