Prod.: Engine, ver.: 6017, ID: 60000792, Wish : A command to change the Current UCS by picking an entitity

Wish : A command to change the Current UCS by picking an entitity

Article60000792
TypeWish
ProductEngine
Version6017
Date Added3/2/2009
FixedYes [2/4/2010]
Submitted byChristian Holbrook
Keywords

Subject

A command to change the Current UCS by picking an entitity

Summary

A command to change the Current UCS by picking an entitity

Solution


In version 6018 the method UCS of vdCommandAction support a new value 'OBJECT' for first 'org' parameter


bool UCS(object org, object px, object py)


In case the org has the string value   'OBJECT' then


   the px parameter can be user define (null or 'USER') or an existing vdFigure object.In case of user ,the user will be prompt to select an object on the screen.


  the py parameter can be user define (null or 'USER')  or a point in Current User Coordinate System



Define a UCS by selecting an object 



Object                                       Method of determining UCS



Arc                                            The center of the arc becomes the new UCS origin. The X axis passes through the arc endpoint that is closest to the selection point.



Circle                                         The center of the circle becomes the new UCS origin. The X axis passes through the selection point.



Dimension                                   The insertion point of the dimension text becomes the new UCS origin



Line                                           The endpoint nearest the selection point becomes the new UCS origin. The X axis passes through the other point of the line





Point                                          The point becomes the new UCS origin. 



Polyline                                       If the SplineFlag is Standard then the ucs is defined by the picking segment(see Line or Arc).Otherwise the endpoint of the selected segment , nearest the selection point becomes the new UCS origin



3DFace                                       The new UCS origin is taken from the first point, the X axis from the first two points, and the Y positive side from the first and fourth points.



Insert,Text,MText, Attribute , Rect  The insertion point of the object becomes the new UCS origin, and the new X axis is defined by the rotation of the object about its extrusion direction.



Ellipse                                         The center point of the object becomes the new UCS origin, and the new X axis is defined by the MajorAngle of the object about its extrusion direction.



Polyhatch                                    The mid point of object bounding box becomes the new UCS origin. 



Leader                                        The ucs is defined by the LeaderMtext (see Mtext).