TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Krushert on March 07, 2011, 12:55:20 PM

Title: Overriding a single dimension.
Post by: Krushert on March 07, 2011, 12:55:20 PM
Okay I got one half of the puzzle put together.  I want to move the text of the dimension and then change the vertical position of the dim text.  Right now I have to select the text and right click the mouse to move and then select the text again, right click again in order to center it.  A pain if I have more that a couple of dimensions to process.

I have the move part down, that was simple enough.  But the center part is not working.  if I used the command line command [_ai_dim_textcenter] after doing the right click method and tossing that into my code, it spits up unknown command.  IMO, it acts as if it is a transparent command.   So that is not working.

I did a search with the DXF codes that reflect the DIMTAD variable but how do I use it. 
Code: [Select]
    (1070 . 77) (1070 . 1)
Or is there a better way?
Title: Re: Overriding a single dimension.
Post by: BlackBox on March 07, 2011, 01:29:08 PM
My two cents...

If you need to modify dimensions often, why not simply use a selection set, and modify the ActiveX properties as necessary?

For more information about the properties and methods available, use the vlax-dump-object function, or see the developer documentation.

Edit: If you still need help, try posting your code?

Hope this helps!
Title: Re: Overriding a single dimension.
Post by: alanjt on March 07, 2011, 01:32:13 PM
Code: [Select]
(c:ai_dim_textcenter)
Title: Re: Overriding a single dimension.
Post by: Krushert on March 07, 2011, 02:23:18 PM
Code: [Select]
(c:ai_dim_textcenter)
Okay I can get that to work in the code but I can not get that to work with  aidimtextmove.  Each one will work fine by themselves but when I try to combine them it gives me the number one sign.  This is the close to working as I got it.

Code: [Select]
(defun c:DTM ()
(c:ai_dim_textcenter)

(SETQ DIMOBJ (ENTLAST))
 
(VL-CMDF "aidimtextmove" "1"  DIMOBJ )
 
); END OF ROUTINE