Jump to content

Torient Command and Lisp


SunnyTurtle

Recommended Posts

Hi all

 

I am having a problem with the TORIENT command which aligns text and other stuff to a particular angle for example a line

 

Now i am very lazy and have millions of text to align with different line i wanted to make a shortcut to this command an i created this lisp

[font=Tahoma](defun c:to () (command "torient"))[/font]

But I doesn't work for me it says that it is an unknown command.

 

But when I type it in manually it works fine

 

If this helps there is a variable torient i looked that up using

!torient
Link to comment
Share on other sites

Just for completeness:

 

Since TOrient is an Express Tool command, it cannot be called using the command function in LISP, instead you can call it using:

 

(defun c:to nil (c:torient))

Link to comment
Share on other sites

You don't need a lisp routine for this. Just put a command alias in your pgp file.

*cough*AGREE*cough*

Link to comment
Share on other sites

Just for completeness:

Since TOrient is an Express Tool command, it cannot be called using the command function in LISP, instead you can call it using:

(defun c:to nil (c:torient))

This works well thanks it is just a simple lisp now but i have a lisp that im working on that could use this command as well

Thanks Lee Mac

You don't need a lisp routine for this. Just put a command alias in your pgp file.

Where do you find the pgp file and is it like a short cut registry or something

Link to comment
Share on other sites

Where do you find the pgp file and is it like a short cut registry or something

 

The pgp file contains all of your command aliases. You can access it from within Autocad by going to the Tools menu > Customize > Edit Program Parameters (acad.pgp). The file will open in Notepad and you can edit existing aliases or add your own at the bottom, in the "User Defined" section.

 

Here's another way to create command aliases through the Express Tools Alias Editor: http://www.ellenfinkelstein.com/AutoCAD_tips_create_alias.html

 

Whatever way you choose to edit your pgp file, you will need to run the REINIT command after editing in order for your changes to take effect.

 

Note: Whenever making changes to any files, be sure to save an unedited backup copy, in case you royally screw it up. :wink:

Link to comment
Share on other sites

Whatever way you choose to edit your pgp file, you will need to run the REINIT command after editing in order for your changes to take effect.
If you use the Express Tools "Command Alias Editor" you don't need to run ReInit afterwards. :wink:
Link to comment
Share on other sites

  • 3 weeks later...

Hi again this it being a while since i fixed this problem but i am have the same problem again but a little different this time.

 

I am trying to create a shortcut to a lisp. Now if i had the ablity to edit this lisp i would just change the (defun c:ncopy ()..... to (defun c:nc ()....... but i don't have access to it or at least i don't think i do.

 

So is there a way to shortcut the a lisp

(defun c: nc ()
(command ncopy))

This does not work so what am i doing wrong

Link to comment
Share on other sites

agreed.

 

Sometimes folks may want a temporary override for a command alias. It is still not good practice to modify native AutoCAD command aliases. Check the ACAD.pgp and add aliases that are not currently in use, otherwise, it drives your CADD Department Manager up a wall when trying to troubleshoot what went haywire on your machine. :wink:

 

Also, the CADD Manager usually has a few tricks up his/her sleeve that can truly tweak your machine back into submission! :twisted:

 

I might even resemble that remark.

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