Author Topic: Sub object selection problem  (Read 1691 times)

0 Members and 1 Guest are viewing this topic.

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Sub object selection problem
« on: December 18, 2017, 07:15:26 AM »
Hi all,

I have a little unusual problem I am facing... I know it can take your time to experiment, so only if you are willing to help and have spare time you could do it and thanks for that attempt...

Situation : create few SPHERE entities - turn SOLIDHIST=1, and then so some UNION, SUBTRACT things until you get complex 3DSOLID with recorded history... Now turn SUBOBJSELECTIONMODE=4 or simply press SHIFT+F5... Cursor will show notification for selecting history sub objects... Now paste this line to your command prompt :

Code: [Select]
(sssetfirst nil (ssget "_F:V" (list (getpoint) (getpoint))))

Now setup top view if it's not set...
Now you click for the first point, point that will be first fence point from imaginary fence that should pass through at least 2 sub objects; click for the second point so that crossing 2 sub objects is true... CAD should highlight those 2 sub objects (SPHERE entities)...

Now question :
If I look into property palette or quick palette it shows 2 Spheres, or if I type LIST it should print at command prompt 2 objects selected... First question : how to count how many sub objects are selected this way - (sslength (ssget "_I")) doesn't help as it shows only 1 complex 3DSOLID entity; (ssnamex (ssget "_I")) also shows ename of parent complex 3DSOLID?
Second question : repeat procedure to highlight sub objects with posted line in code tag; Now when 2 sub objects are highlighted and you did find that there are more than 1 - you found answer to first question, how can I now highlight one of those two without using SHIFT+mouse click - programmatically through code - I want to cycle through them switch 1 sub object then the other one, and so on back to previous and so on cycling like ALT+TAB multitasking...
Finally I want to highlight just one single sub object when and if more are highlighted...
So can this be done programmatically?

Thanks for your time and for even reading this...
M.R.
« Last Edit: December 18, 2017, 07:37:02 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: Sub object selection problem
« Reply #1 on: December 20, 2017, 09:01:16 AM »
To cut the story... I need answer to the first question more... How many sub objects are selected when you select sub objects from complex 3DSOLID entity?
 :|
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: Sub object selection problem
« Reply #3 on: December 20, 2017, 11:55:14 AM »
The solution looks innovative, I'd try checking out 102-310-330-340 group codes for every object in the selection - If the subobjects work/are structured/ as a group, due the offered ALE_GetGroupNames from here.
Maybe you could collect the subobjects from there, however I'm not sure if thats the right direction, but atleast is some.  :rolleyes2:
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg