Author Topic: How to get the insertion point of a nested block, the easy way?  (Read 6648 times)

0 Members and 1 Guest are viewing this topic.

LE

  • Guest
How to get the insertion point of a nested block, the easy way?
« on: October 13, 2005, 10:23:44 AM »
The block can be in any deep form, rotated, scaled, etc, and with a simple selection obtain the insertion point.

- No osnap features.
- No matrix transformation calculations

Dinosaur

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #1 on: October 13, 2005, 10:32:23 AM »
grips?

LE

  • Guest

hudster

  • Gator
  • Posts: 2848
Re: How to get the insertion point of a nested block, the easy way?
« Reply #3 on: October 13, 2005, 10:39:51 AM »
Explode block, find insertion point, undo? :-D
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

LE

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #4 on: October 13, 2005, 10:40:37 AM »
Here is the command for now in FAS mode.

Command: NESTIP

LE

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #5 on: October 13, 2005, 10:44:05 AM »
Explode block, find insertion point, undo? :-D

 :-)

That is not an easy way....

whdjr

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #6 on: October 13, 2005, 10:55:34 AM »
About 30 seconds...pretty easy to me  8-)

Code: [Select]
((lambda (/ ent)
   (setq ent (entsel))
   (if ent
     (princ (cdr (assoc 10 (entget (car ent)))))
   )
 )
)
« Last Edit: October 13, 2005, 11:00:15 AM by whdjr »

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: How to get the insertion point of a nested block, the easy way?
« Reply #7 on: October 13, 2005, 10:58:04 AM »
Excellent. Small problem: Doesn't work.

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

whdjr

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #8 on: October 13, 2005, 10:59:44 AM »
Yeah, I just realized that.

I'll fix.

LE

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #9 on: October 13, 2005, 11:21:09 AM »
It is a max of three lines code.....

Fatty

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #10 on: October 13, 2005, 11:24:23 AM »
It is a max of three lines code.....

Maybe with (vla-get-subentity bla bla)?

F.

LE

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #11 on: October 13, 2005, 11:31:48 AM »
It is a max of three lines code.....

Maybe with (vla-get-subentity bla bla)?

F.

That function will require more than three lines of code.... give it a try.....

Code: [Select]
vla-getsubentity

whdjr

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #12 on: October 13, 2005, 12:06:53 PM »
It is a max of three lines code.....

Easy...don't put any returns in it... :lmao:

Sorry...couldn't resist... :mrgreen:

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: How to get the insertion point of a nested block, the easy way?
« Reply #13 on: October 13, 2005, 12:08:03 PM »
Don't have time to write a proper wrapper for this (i.e. ucs active etc.) but if you select a nested block with the wcs active this should work:

(last (caddr (nentsel)))
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

LE

  • Guest
Re: How to get the insertion point of a nested block, the easy way?
« Reply #14 on: October 13, 2005, 12:12:25 PM »
Don't have time to write a proper wrapper for this (i.e. ucs active etc.) but if you select a nested block with the wcs active this should work:

(last (caddr (nentsel)))

Good.... you da' man

I need to post harder questions...... have fun

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: How to get the insertion point of a nested block, the easy way?
« Reply #15 on: October 13, 2005, 12:28:22 PM »
They don't have to be necessarily hard Luis, just fun. Now if they're a little challenging there's nothing wrong with that either ...

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