×
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

Select object in pspace & viewport scale

Select object in pspace & viewport scale

Select object in pspace & viewport scale

(OP)
I'm writing a lisp program to auto-gen drawings. It gets a few dimensions from the user, switches to ms & draws the part, then switches to ps & inserts an autoscaled viewport. I want to then dimension it in ps, but to do that I need the center point of the circle (in ms) and the viewport scale. The rest I can figure out.

The circle is always centered @ 0,0 in ms, but varies slightly in ps due to size variations. The viewport is always the same size/position. I can get the center point of the cicle in ms (using lisp), but not ps? Any ideas? If someone knows how to select an entity (the cicle) in ms while in ps, or if the coords in ms can be transformed to ps that would solve my problem. Any help would be appreciated.

Also, is there a variable for viewport scale, or is there a group code that holds the scale? I have the viewport autoscale when inserted to fit all ms objects, but when looking at the entity info, nothing matches the scale shown in the properties dialog. Do I have to manually set the scale to keep consistancy?

RE: Select object in pspace & viewport scale

You can get the scale by Group Code 45 (height in MS) divided by GC 41 (height in PS).

The center of the viewport in MS is GC 12, center of viewport PS is GC 10.

Hope this helps!

RE: Select object in pspace & viewport scale

(OP)
Thats exactly what I needed, thanks Carl!

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