Jump to content
ziele_o2k

Quick question about block insertion point

Recommended Posts

ziele_o2k

Hi,

I'm playing with blocks data extraction. I just want to be sure.

The best way to get block insertion point in WCS/UCS is:

For ename:

(trans (cdr (assoc 10 (entget _ent))) _ent 0) ;WCS
(trans (cdr (assoc 10 (entget _ent))) _ent 1) ;UCS

For vla-object:

(vla-get-InsertionPoint _obj) ;WCS
(trans (vla-get-InsertionPoint _obj) 0 1) ;UCS

Share this post


Link to post
Share on other sites
hanhphuc

(vla-get-InsertionPoint _obj)

not sure if ac2018 trans can pass argument as variant value?

 

(vlax-get _obj 'InsertionPoint)

This returns a list

Share this post


Link to post
Share on other sites
ziele_o2k

Ofcourse, vla-get-InsertionPoint returns variant.

That was only mental shortcut.

Correct version is:

 (vlax-safearray->list(vlax-variant-value(vla-get-InsertionPoint  _obj)))

Share this post


Link to post
Share on other sites
dlanorh
(vlax-get _obj 'insertionpoint)

will return a list

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×