Jump to content

scale text and Move text in the angle of its orientation


symoin

Recommended Posts

Hai,

 

I have lots of text parallet to polylines, I have to scale them to reduce the size then I have to move the text towards the polyline to reduce the gap between the polylines and the text. These polylines and text are in different directions.

Iam looking for a lisp code.

 

Help is always appreciated.

Link to comment
Share on other sites

  • Replies 29
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    9

  • Tharwat

    8

  • Lee Mac

    6

  • symoin

    4

Popular Days

Top Posters In This Topic

Posted Images

Hi

You can try this one;

(defun c:gap (/ scalefactor input ent xcar)
 (setq scalefactor(getreal(strcat "\nSpecify scale factor:")))
 (setq input scalefactor)
 (setq ent (car (entsel "\nSelect text: ")))
 (setq xcar(cdr (assoc 10 (entget ent))))
 (command "_scale" ent "" xcar input "")
 (princ "CadTutor Forum")
 (princ))
 

Regards

Tharwat

Link to comment
Share on other sites

Thanks Tharwat313,

 

when I copied the lisp into autocad 2009 or when i copied the content into notepad and saved as lisp and apploaded it in autocad 2009 it shows an error messege.

 

(LOAD "d:/moin/gap.lsp") ;

error: bad argument type: numberp: nil

 

can you fix this.

Thanks

 

Link to comment
Share on other sites

What is usage of these 2 lines?

 

(setq scalefactor(getreal(strcat "\nSpecify scale factor:")))
 (setq input scalefactor)

 

Shouldnt be

  (setq input (getreal(strcat "\nSpecify scale factor:")))

 

What is usage of strcat?

 

 
(setq input (getreal "\nSpecify scale factor:"))

or you want to convert real to string

(setq input (rtos (getreal "\nSpecify scale factor:")))

 

Regards

Link to comment
Share on other sites

What is usage of these 2 lines?

 

(setq scalefactor(getreal(strcat "\nSpecify scale factor:")))
 (setq input scalefactor)

 

Shouldnt be

  (setq input (getreal(strcat "\nSpecify scale factor:")))

 

What is usage of strcat?

 

 
(setq input (getreal "\nSpecify scale factor:"))

or you want to convert real to string

(setq input (rtos (getreal "\nSpecify scale factor:")))

 

Regards

I used the 'strcat' because I wanted to add the entered value by the user

and I changed my mind due to personal reasons.

 

So that does not affect on the performance of the program Mr asoooooooooos

 

Tharwat

Link to comment
Share on other sites

Hai all,

 

If you could look GT_TXTSLIDE at this link http://www.4d-technologies.com/geotools/manual/text_tools.htm.

 

My requirement is exactly the same as this. can you code something like this.

 

most of these commands are included with Autocad express menu, so try to use them , and you will be in no need for any codes except for special routines.

 

Regards

Tharwat

Link to comment
Share on other sites

Hai all,

 

If you could look GT_TXTSLIDE at this link http://www.4d-technologies.com/geotools/manual/text_tools.htm.

 

My requirement is exactly the same as this. can you code something like this.

Why not use what they provide? It's actually really easy to code. Just select the text/mtext, define a rotation and distance, then use the polar command to define and place a new insertionpoint for the text/mtext.

 

eg.

 

slide.gif

Link to comment
Share on other sites

I used the 'strcat' because I wanted to add the entered value by the user

and I changed my mind due to personal reasons.

 

So that does not affect on the performance of the program Mr asoooooooooos

 

Tharwat

 

That makes no sense.

Link to comment
Share on other sites

Hi experts

 

the truth is that I made the sense of communications between all

memers of this esteemed Forum within a quick reply to a member.

 

And that's so precious ..... isn't?

Hot regards,

 

Tharwat

Link to comment
Share on other sites

the truth is that I made the sense of communications between all

memers of this esteemed Forum within a quick reply to a member.

 

And that's so precious ..... isn't?

 

Is it not better to take a moment and provide a correct response? Rather than post erroneous quickly?

Link to comment
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
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...