Jump to content

UCS: what's the best way to manage it?


Recommended Posts

Posted

Hi mates,

I was wondering if someone could help me to understand USER COORDINATE SYSTEM.

How to properly use it?

I mean, should I drown in world ucs or in the user one?

I hope to read some good hits from you

 

Bye,

Stefano

Posted

The default for a new drawing is World. The option to change it is entirely yours depending on what you are drawing.

Posted

Hi ReMark, thanks for reply me :)

What do you mean exactly when you said:

...depending on what you are drawing

I mean, let's image that you send a drawn to a friend of you for printing out, which is the most common ways for architectural 2d works?

Posted

A 2D architectural drawing? I'm guessing the UCS would be in its normal position (X - pointing to the right, Y - pointing up, Z - pointing out of the screen towards the viewer). But, let's say the building has a wing that is at a 45 degree angle. The user could reposition of UCS to match the angle of the wing. Understand? When this is done the crosshairs will be reoriented as well.

Posted

that's right, I'm getting you now!

 

Thanks mate for your help, I really appreciate it!

Posted

Remember you can position the UCS in any number of orientations to match what you are drawing at the time. If it is a roof with a 1:12 pitch (4d30') or 8:12 pitch (33d45') you can match that as well.

 

I find that I do more with the UCS in a 3D drawing than I do with a 2D drawing.

Posted

I see what you mean...

Many thanks for all!

Posted

The "trick" in arch drawings is to use the UCS to help you draw accurately. The UCS shouldn't be used just because it's there, rather take it as sparingly as possible. But as ReMark's suggested, it's very much a function of the situation. Here's 2 scenarios:

 

  1. As ReMark's example of a building with a kinked wing. If it's not possible or very difficult to split the building at such kink, I'd say a UCS would help enormously. That way you can change to the UCS and use the plan command - so you can draw orthogonally on that kinked wing.
  2. Say you have a site with several buildings, all placed and rotated in (seemingly) random manner. I'd advise NOT using a UCS per building. Rather draw each building in its own DWG at that DWG's WCS. When you insert / attach that you can very easily move and / or rotate the block / xref without even worrying about a UCS.

The 2nd scenario I've learnt from bitter experience. Having several multi-storey buildings on a site-plan. The "bright" idea was to use the site-setting-out point as a common 0,0,0 for all the buildings. Each building was drawn in its own set of DWGs per floor, with it's own internal UCS set-up for its grid lines. So after the drawings have progressed into the order of 500+ ... the client asked to move and rotate these buildings about a bit (better views apparently). Sounds easy? It wasn't! Every single viewport in every one of those 500+ drawings now needed to be re-zoomed and rotated to match each building's new position and orientation. If each building was drawn with its grid aligning to its DWG's WCS then the only change needed would have been a move and rotate on the site-plan only

 

So as a rule of thumb I use UCS only when I can't do something else instead. If the skew portion forms part of the whole then I'm forced into a UCS. If the skew portion can clearly be split off as something separate, then I don't use a UCS.

 

Another thing: accuracy is less than 100% when you don't draw in WCS. Remember that you're drawing at an angle when you're drawing in a UCS (even if it doesn't look like that). And ACad is notorious for not working well with angles (due to it using radians internally - thus a 90 degree angle can at best be approximated to 16 digits compared to half of PI - if there's no other conversion problems, which there definitely is), so you have to check your accuracy every time: not too bad when working with inches (since you generally work in fractions in any case - you tend to not see these inaccuracies too easily). But when in metric, you hardly ever want to see a value not being a multiple of 5 or 10 mm ... let alone a fraction of a mm. And just setting your dims to round off to 5 or 10 (or even 1) will cause rounding errors (you can be sure of it, I've never seen it NOT happen). There's much less possibility of these problems cropping up when you use WCS as a preference.

 

If you're doing any 3D work, you'll start needing UCS's to rotate, draw, copy, etc (not to mention extrude) shapes in different 3D directions. But these UCS's are more of a drawing aid - can be seen as something similar to Revit's work planes.

Posted

I agree

 

2D leave the UCS alone, alway leave at WCS - World

 

3D you need the UCS to use as your plane

Posted

thank you irneb, Grant and ReMark for your help. :)

Now I have a much better idea about UCS

Posted

Don't forget to consult your User's Guide and the AutoCAD Help files for further information.

  • 1 year later...
Posted

hi, irneb

 

It seems we are facing very similar bitter experience in our practice.

New geo-coordinates point, which is slightly different from design phase one is taken as one for execution phase.

We have prepared all documents from all different parties involved in project use geo-referenced files from the start. (if i understood you well this was mistake)

so now

It seems we need to move all objects in drawing +500 (move x: -2.xxxcm y: 4.xxxcm rotate: 0.0177degree).

Is there a way you can imagine to make it automatize/batch process?

 

As movement is so little we may not need to move view port for print sheet, i hope so.

Posted

hi we are finding the way to process them.

_ai_selall
move 0,0 0.0256,-0.0454

_ai_selall
rotate @602557.47,133102.19 0.0177   

 

we also find the way to eraze ucs by script. but not import ucs by script...

Posted

An old Lisp of mine and others': http://forums.augi.com/showthread.php?t=50567

 

Does your coordinates simply move? Is there no rotation involved as well? If it's just such a small change you're extremely lucky!

 

It might be possible to do even the VP adjustment through Lisp / Script, try searching these forums for such.

Posted

We do road designs for long roads so we use UCS'S to realign each layout sheet so that the portion of road is more horizontal fitting better on the sheet, the first sheet would be an overall in real world. The one thing though is we save the ucs's and give them names "road" "Road1" so we can flip to any ucs. We make sure we are still drafting in 2D but like above our text etc lines up nicely sq to page.

 

When we do setouts we jump to "world" ie real co-ords then just UCS R Road to return back, the model is never moved or rotated in any way other than using UCS.

 

A word of caution if you use UCS OB make sure its not a 3d line.

Posted
A word of caution if you use UCS OB make sure its not a 3d line.
Agreed! Even polylines could cause hassles. AFAIK the best entity type to use when setting a UCS per Object would be a block: thus the block's insertion point becomes the UCS's 0,0,0, the rotation becomes the UCS's rotation around the Z-axis and the UCS accepts the block's normal (i.e. direction of UCS's Z axis).

 

BTW, I can see your scenario might benefit greatly from Named Views as well. That way you can use the drop-down to change views and it would adjust the view-orientation, UCS & layer settings (if needed) in one instruction. Sorry if you're already using these, but it wasn't clear from your post.

Posted

thank you irneb and others who gave tips:

we found the way for moving objects with script so half part is done.

 

just one thing still we could not find the way through is to write a script for importingUCS with specific source file;

 

we use importUCS.lsp that we found but how can we set source file path?

does anyone has idea?

(vl-load-com)
;; Import named user coordinate systems from selected source file.
(defun c:ImportUCS (/ UCSs fullpath srcdoc srcucss cnt name ucslst 
                      DocAtPath)

 ;; Argument: full path.
 ;; Returns a document object. An ODBX doc if the file isn't open.
 ;; Otherwise a doc contained in the active documents collection.
 (defun DocAtPath (path / *acad* version file srcdoc)
   (setq *acad* (vlax-get-acad-object))
   ;check the documents collection
   (vlax-for x (vla-get-documents *acad*)
     (if (= (strcase path) (strcase (vlax-get x 'FullName)))
       (setq srcdoc x)
     )
   )
   ;otherwise use ObjectDBX
   (if (not srcdoc)
     (cond
       ;2004 or later. Allow for future versions like 
       ;"ObjectDBX.AxDbDocument.17" by Tony Tanzillo
       ((> (setq version (atoi (getvar "AcadVer"))) 15)
         (setq srcdoc 
           (vla-GetInterfaceObject *acad* 
             (strcat "ObjectDBX.AxDbDocument." (itoa version))))
         (vla-open srcdoc path)
       )
       ;prior to 2004
       (T
         (if
           (and
             (vl-catch-all-error-p
               (vl-catch-all-apply 
                 'vla-GetInterfaceObject
                   (list *acad* "ObjectDBX.AxDbDocument")))
             (setq file (findfile "AxDb15.dll"))
           )
           (startapp "regsvr32.exe" (strcat "/s \"" file "\""))
         )
         (setq srcdoc (vla-GetInterfaceObject *acad* "ObjectDBX.AxDbDocument"))
         (vla-open srcdoc path)
       )
     )
   )
   srcdoc
 ) ;end


 ;; primary function
 (setq UCSs 
   (vla-get-UserCoordinateSystems
     (vla-get-activedocument (vlax-get-acad-object))))
 (and 
   (setq fullpath (getfiled "Source File" (getvar "dwgprefix") "dwg" 0))
   (setq srcdoc (DocAtPath fullpath))
   (setq srcucss (vla-get-UserCoordinateSystems srcdoc))
   (< 0 (vlax-get srcucss 'Count))
   (setq cnt 0)
   (vlax-for x srcucss
     (setq name (vlax-get x 'Name))
     (if 
       (and
         (not (tblsearch "ucs" name))
         (not (wcmatch name "_Active*"))
       )
       (setq ucslst (cons x ucslst)
             cnt (1+ cnt)
       )
     )
   )
   (not (vlax-invoke srcdoc 'copyobjects ucslst UCSs))
   (princ (strcat "\nNumber of coordinate systems imported: " (itoa cnt)))
 ) ;and
 (if srcdoc (vlax-release-object srcdoc))
 (princ)
) ;end

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