Results 1 to 6 of 6

Thread: Field to display point coordinates relative to CURRENT ucs, not WORLD UCS

  1. #1
    I could stop if I wanted to jpcadconsulting347236's Avatar
    Join Date
    2011-09
    Posts
    298
    Login to Give a bone
    0

    Default Field to display point coordinates relative to CURRENT ucs, not WORLD UCS

    Hello gang,

    I've got a request to create a coordinates block that displays the X and Y distance from the origin point of the UCS that is current when the block is inserted.

    This seems to be eluding me, as all my attempts always display the X and Y distances to 0,0 in the World Coordinate System regardless of which UCS is current.

    Any help is, as always, much appreciated.

    -JP
    James Pertusi

    CAD Applications Consultant
    1 (646) 773 4834
    www.jpcadconsulting.com

  2. #2
    Certifiable AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    4,771
    Login to Give a bone
    0

    Default Re: Field to display point coordinates relative to CURRENT ucs, not WORLD UCS

    If the block does not need to show dynamic coordinates, but just the coordinates it was originally inserted at, I'd look at a LISP routine to insert the block and stuff the attribute information into it.
    Real pirates wear silk suits & ties, and write EULAs
    The only thing more dangerous to the liberty of a free people than big government, is big business.

    Toward a Sustainable Water Future: Visions for 2050 http://ascelibrary.org/doi/book/10.1061/9780784412077

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,272
    Login to Give a bone
    0

    Default Re: Field to display point coordinates relative to CURRENT ucs, not WORLD UCS

    Something like:
    Code:
    ;| Label for Point.
       PtLabel.lsp BY: TOM BEAUFORD
       ^P(or C:Label (load "PtLabel.lsp"));PtLabel
       BeaufordT@LeonCountyFL.gov
       Leon County Public Works/Engineering
    ==================================================================|;
    
    (defun C:PtLabel (/ ATTDIA)
          (setq ATTDIA (getvar "ATTDIA"))
          (setvar "ATTDIA" 0)
          (command "._INSERT"
                   "Pt_Coordinates"
                   (getpoint "Pick Point: ")						;Insert pt
                   (/ 0.1 (getvar "cannoscalevalue"))				;X Scale
    ;               (* (getvar "DIMTXT") (getvar "DIMSCALE"))	;X Scale (Alternate)
                   ""						;Y Scale
                   ""				                ;Rotation
                   ""					        ;Easting
                   ""					        ;Northing
          )
          (setvar "ATTDIA" ATTDIA)
          (entupd (entlast))
    ;      (command "._DDATTE" (entlast))
          (princ)
    )
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,272
    Login to Give a bone
    0

    Default Re: Field to display point coordinates relative to CURRENT ucs, not WORLD UCS

    Sorry, that displays WCS not UCS.
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  5. #5
    I could stop if I wanted to jpcadconsulting347236's Avatar
    Join Date
    2011-09
    Posts
    298
    Login to Give a bone
    0

    Default Re: Field to display point coordinates relative to CURRENT ucs, not WORLD UCS

    Bump...

    Anyone figured this out? Fields with UCS coords rather than WCS?

    Any guidance is appreciated.
    James Pertusi

    CAD Applications Consultant
    1 (646) 773 4834
    www.jpcadconsulting.com

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,272
    Login to Give a bone
    0

    Default Re: Field to display point coordinates relative to CURRENT ucs, not WORLD UCS

    If you wblock entire drawing the current UCS will be the world UCS in the new drawing.
    Might help for a workaround.
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

Similar Threads

  1. Field shows different coordinates than actual point
    By crullier in forum AutoCAD Fields
    Replies: 20
    Last Post: 2015-07-31, 10:20 PM
  2. 2013: How do I export to IFC with project coordinates and not real world coordinates?
    By m.knutsson in forum Revit Architecture - General
    Replies: 2
    Last Post: 2013-10-15, 06:54 AM
  3. Attribute Extraction relative to current (not World) ucs
    By J17 in forum CAD Management - General
    Replies: 1
    Last Post: 2008-10-29, 04:18 PM
  4. Replies: 0
    Last Post: 2007-09-30, 02:56 PM
  5. Field for coords relative to current UCS
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2006-02-10, 11:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •