Jump to content

'torient' text based on 2 previously picked points.


Recommended Posts

Posted

Hi,

As part of a command i want to automate a process.

i'm using my 'left' and 'right' points for more that just the TORIENT command (among other things to calculate a distance, setting the UCS, needing the coordinates for a X and Y placement of objects).

However, i want to run the TORIENT command to align a text to a line, based on the first and second point.

 

[code]
(Defun C:tolh2 (/ left right)
(setq left (getpoint "Pick left point: "))
(setq right (getpoint "Pick left point: "))
(defun torient nil (c:torient))
(torrient)
(command pause left right)
)

[/code]

i condensed the code as above.  Torient is a express tools command, so i googled that i need to call it in a function.  However, it then proceeds as a command on its own and seems to ignore the inputs i set in the 'command' part below.

The command part should 'pause' to select the text object, and then pick the first (left) and second (right) point. However i have to select these 'left' and 'right' points myself.

Any tips on how to run the TORIENT command with the 'first' and 'second' point read from the 'left' and 'right' vars?

Posted

Generally the format would be

 

(command "Command name" [all inouts] )

 

 

so try this

 

(command "terrient" pause left right)

 

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