×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

convert points between UCS and WCS with AutoLISP

convert points between UCS and WCS with AutoLISP

convert points between UCS and WCS with AutoLISP

(OP)
Though CAL can do this, but how can I complete in an AutoLISP file?

Thank you

RE: convert points between UCS and WCS with AutoLISP

Translates a point (or a displacement) from one coordinate system to another

(trans pt from to [disp])   
Arguments

pt
A list of three reals that can be interpreted as either a 3D point or a 3D displacement (vector).

from
An integer code, entity name, or 3D extrusion vector identifying the coordinate system in which pt is expressed. The integer code can be one of the following:

0 World (WCS)

1 User (current UCS)

2 If used with code 0 or 1, this indicates the Display Coordinate System (DCS) of the current viewport. When used with code 3, it indicates the DCS of the current model space viewport.

3 Paper space DCS (used only with code 2)

to
An integer code, entity name, or 3D extrusion vector identifying the coordinate system of the returned point. See the from argument for a list of valid integer codes.

disp
If present and is not nil, this argument specifies that pt is to be treated as a 3D displacement rather than as a point.

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources