Use VLA-GET to return insertion point of a PDF Overlay

Use VLA-GET to return insertion point of a PDF Overlay

Anonymous
Not applicable
756 Views
4 Replies
Message 1 of 5

Use VLA-GET to return insertion point of a PDF Overlay

Anonymous
Not applicable

Anyone know if a way to use vla-get in Autolisp to return the insertion point of a PDF overlay?

 

I'm just planning my program, but I've found that I can get the width (vla-get-width) and height (vla-get-height) of the PDF overlay with no problem, and vla-get-position doesn't work; no other vla-get function seems to match what I'm looking for.

 

Any help here would be greatly appreciated.

0 Likes
Accepted solutions (1)
757 Views
4 Replies
Replies (4)
Message 2 of 5

marko_ribar
Advisor
Advisor
Accepted solution
(safearray-value (variant-value (vla-get-position (vlax-ename->vla-object (car (entsel "\nPick PDF Underlay..."))))))
Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 3 of 5

Anonymous
Not applicable

Thanks Marko!

 

Have a great day!Smiley Happy

0 Likes
Message 4 of 5

Kent1Cooper
Consultant
Consultant

For some VLA Properties, the (vlax-get) function conveniently returns them directly in the form you are likely to want them in, without the need for extracting from safearray/variant intermediates, and therefore with considerably less code:

 

(vlax-get (vlax-ename->vla-object (car (entsel "\nPick a PDF: "))) 'Position)

Kent Cooper, AIA
Message 5 of 5

Anonymous
Not applicable

Many thanks Kent!  I greatly appreciate streamlined code!

 

Cheers! Smiley Very Happy

0 Likes