Jump to content

Recommended Posts

Posted

Hi all,

I want to get position of dimension text by vla commands and I test below code but it doesn't work, 

 

(setq s (car (entsel)))
(setq ss (vlax-ename->vla-object s))
(setq textPosition ( vla-get-TextPosition ss))

 

Can someone tell me what's wrong with the code?

Posted

The code works, but the point is returned as a variant. To get a point-as-list value you can do two things:

(setq textPosition (vlax-safearray->list (vlax-variant-value (vla-get-textposition ss))))
(setq textPosition (vlax-get ss 'textposition))

 

  • Like 1
Posted (edited)

Thank you so much Roy_043, the second code was excellent, I have two question :

- Can we get all property by 'vla-get' ?? for example text value, text size , text color, text style

- is there vla code to get insertion point of text ?? (not text dimension) (I always use "cdr (assoc 10 c)")

Edited by amir0914
Posted

Use dumpit.lsp and have a look some info can be at a level below.

 

: DUMPIT
Select entity: 
; IAcadDimRotated 36ab9370 : TeighaX Interface of a dimension that measures the distance between two points and is displayed at a given rotation
;
; Property values :
there are 114 variables displayed. So did not paste to here.

 

 

 

DumpIt.LSP

  • Like 1
Posted
3 hours ago, BIGAL said:

Use dumpit.lsp and have a look some info can be at a level below.

 

: DUMPIT
Select entity: 
; IAcadDimRotated 36ab9370 : TeighaX Interface of a dimension that measures the distance between two points and is displayed at a given rotation
;
; Property values :
there are 114 variables displayed. So did not paste to here.

 

 

 

DumpIt.LSP 522 B · 3 downloads

Thanks a lot BIGAL

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...