Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Select object in pspace & viewport scale 1

Status
Not open for further replies.

Nate242

Mechanical
Feb 14, 2005
25
0
0
US
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?
 
Replies continue below

Recommended for you

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!
 
Status
Not open for further replies.
Back
Top