• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

vba coordinates of the insertion point table

KATERYNA

Guest
Good morning to all,
I would need to extract from the drawing with vba the coordinates of the insertion point of the table, previously inserted with getpoint and subsequently moved.
is there a possibility to find the coordinates of the table?
I found the command to have polylinea coordinates and other autocad objects, but it doesn't work with the table.
Could someone help me?
Thank you!
 
Code:
private sub selecttabella()
    
    dim tabella as acadtable
    dim pt as variant
    dim ssetobj as acadselectionset
    
    on error resume next
    thisdrawing.selectionsets.item("sset").delete
    on error goto 0
    
    set ssetobj = thisdrawing.selectionsets.add("sset")
    ssetobj.selectonscreen
    
    set tabella = ssetobj.item(0)
    pt = tabella.insertionpoint
    
    msgbox "x: " & pt(0) & "  -  y: " & pt(1)
    
    thisdrawing.selectionsets.item("sset").delete
    
end sub
Please.
 
If you want the list of properties of an object use this command:
(vlax-dump-object (vlax-ename->vla-object (car (entsel "\nsel ent: "))))

for convenience, created a button with relative command, is very useful on many occasions.
 
Code:
private sub selecttabella()
   
    dim tabella as acadtable
    dim pt as variant
    dim ssetobj as acadselectionset
   
    on error resume next
    thisdrawing.selectionsets.item("sset").delete
    on error goto 0
   
    set ssetobj = thisdrawing.selectionsets.add("sset")
    ssetobj.selectonscreen
   
    set tabella = ssetobj.item(0)
    pt = tabella.insertionpoint
   
    msgbox "x: " & pt(0) & "  -  y: " & pt(1)
   
    thisdrawing.selectionsets.item("sset").delete
   
end sub
Please.
Thank you very much! Very kind!
 
If you want the list of properties of an object use this command:
(vlax-dump-object (vlax-ename->vla-object (car (entsel "\nsel ent: "))))

for convenience, created a button with relative command, is very useful on many occasions.
I had already solved with your first answer. Now I'm studying this command. Thank you again!
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top