Jump to content

Recommended Posts

Posted

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.

  • 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

Posted

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

Posted

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

 

Posted

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

Posted

asos2000

can you fix this i have absolutely no coding knowledge. iam requesting the users for the codes.

Posted
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

Posted
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

Posted
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

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

Posted
That makes no sense.

Just imagine this if they decide to open the archive.

Posted
Just imagine this if they decide to open the archive.

:lol::lol:

Posted
That makes no sense.

That's just horrible.

Posted

:ouch::ouch::ouch:

That's just horrible.

Ouch! The truth can hurt.:ouch:

Posted
:ouch::ouch::ouch:

Ouch! The truth can hurt.:ouch:

I just couldn't help myself. 'personal reasons' :lol:
Posted
:unsure: :huh:

Not you, what you were responding to. I forgot the you can't quote nested posts.

Posted

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

Posted
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?

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