Author Topic: nested ename list  (Read 7760 times)

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: nested ename list
« Reply #30 on: October 07, 2008, 05:59:59 PM »
You're right Tim. Without additional information over and above a nested entity name, like the absolute coordinates where it exists relative to the instance you're interested in, it is not possible to associate the (nested entity) with an arbitrary outermost block instance as only one nested entity exists per all the instances (in the block definition) - when multiple instances exist.
« Last Edit: October 07, 2008, 06:05:27 PM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: nested ename list
« Reply #31 on: October 07, 2008, 06:10:54 PM »
when multiple instances exist.

That's what initially got me. When Tim mentioned his ten copies of the block it finally clicked.
I agree, no way to backtrack without some point data.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: nested ename list
« Reply #32 on: October 07, 2008, 06:20:24 PM »
I've been banging my head on this.

(setq elst (nentsel "\nSelect nested object: "))
(setq nestlst (last elst))

Can nestlst be determined without using nentsel or nentselp?
IOW, a function which takes a nested ename argument and returns
the same list as nestlst.

My research on this question has not turned up a solution so far.
My attempts to code it looking at DXF codes 330 and 331 have failed.

TIA for any help.

If there are only single instances of the block definitions(s) yes.

:D
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Joe Burke

  • Guest
Re: nested ename list
« Reply #33 on: October 08, 2008, 12:03:22 AM »
Thanks everyone for your thoughts and replies.

I was trying to answer a question in the Autodesk customization NG so I don't have all the details. The topic is named Coordinates transformation dated 10/3

T.Willey

  • Needs a day job
  • Posts: 5251
Re: nested ename list
« Reply #34 on: October 08, 2008, 10:57:04 AM »
Thanks everyone for your thoughts and replies.

I was trying to answer a question in the Autodesk customization NG so I don't have all the details. The topic is named Coordinates transformation dated 10/3
Since they changed it, I can't even log on anymore, so I just said forget it, so I haven't been there since.  Maybe I'll go there to see what was asked.

Edit:
Here is the topic ( I think ).
[ http://discussion.autodesk.com/forums/thread.jspa?threadID=696648&tstart=0 ]

If this is the case, then you would have to see the code he is using to get the nested block information.  If he is just stepping through the block definition per insert, then it should be just a transformation matrix from the origin of the block definition, to the insertion point of the insert plus the scale and rotation of the insert.
« Last Edit: October 08, 2008, 12:00:30 PM by T.Willey »
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

qq2008

  • Guest
Re: nested ename list
« Reply #36 on: May 10, 2010, 09:44:33 PM »
The link:
http://discussion.autodesk.com/forums/thread.jspa?threadID=696648&tstart=0

  :-D
here is the code
Code: [Select]
;;;pickset to ename list or vla-object list
;;;Parameters:sset for the selection of sets, xflag to nil when the table into a graphic element for T, into vla object table
;;;for example: (sset->list (ssget) nil)
(defun sset->list (sset xflag / ssetlist)
 (setq ssetlist
       (vl-remove-if   'listp
              (mapcar 'cadr (ssnamex sset))
       ) ;_ end vl-remove-if
 ) ;_ end setq
 (if xflag
  (mapcar 'vlax-ename->vla-object ssetlist)
  ssetlist
 ) ;_ end if
) ;_ end defun
;;;===========================
« Last Edit: May 10, 2010, 09:51:30 PM by qq2008 »