Jump to content
amir0914

Obtain dimension text position

Recommended Posts

amir0914

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?

Share this post


Link to post
Share on other sites
Roy_043

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

Share this post


Link to post
Share on other sites
amir0914
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

Share this post


Link to post
Share on other sites
BIGAL

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

Share this post


Link to post
Share on other sites
amir0914
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

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...