+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Junior Member rjohnson42's Avatar
    Using
    AutoCAD 2011
    Join Date
    Oct 2010
    Posts
    19

    Question Using block's x-coordinate to get station

    Registered forum members do not see this ad.

    I currently have my elevation view set up so that the x-coordinates correspond to the stationing along my structure and the y-coordinate corresponds to the elevations. I have a block that will insert the y-coordinate as it should. However, the x-coordinate requires some formatting so that it is shown properly (e.g. "10+00").

    I have an attribute equal to a the x-coordinate divided by 100 with the precision changed to 0. So, if my point is 1016.123, the formula converts that to 10. This field is followed by a plus sign and then another field. This last field is equal to the x-coordinate minus the x-coordinate converted as before, then times 100. The purpose being that if my x-coordinate is 1016.123, I would get 16.123 and my block attribute would reflect 10+16.123. The problem is that AutoCAD retains all of the x-coordinate's precision when subtracting and I end up with a result of 0. See attached for clarity - I know this last bit is hard to understand if you can actually see what's going on.

    I understand that I could subtract out 1000, but when my stationing is beyond 20+00, I will only be subtracting 1000 and my result will not be correct.

    Do any of you have another solution?

    Thanks!
    Attached Files

  2. #2
    Senior Member
    Discipline
    Structural
    Using
    AutoCAD 2014
    Join Date
    Sep 2011
    Location
    Baia Mare, Romania
    Posts
    225

    Default

    This?
    sample1.dwg

  3. #3
    Junior Member rjohnson42's Avatar
    Using
    AutoCAD 2011
    Join Date
    Oct 2010
    Posts
    19

    Default

    Quote Originally Posted by Stefan BMR View Post
    Nice!! Is there a list of functions that can be used with fields?

    Thanks again, I really appreciate it!

    EDIT: here's a list of functions in case anyone is interested: http://www.cadforum.cz/cadforum_en/qaID.asp?tip=6381

  4. #4
    Senior Member
    Discipline
    Structural
    Using
    AutoCAD 2014
    Join Date
    Sep 2011
    Location
    Baia Mare, Romania
    Posts
    225

    Default

    Registered forum members do not see this ad.

    Thank you rjohnson.
    A list of all available functions, besides the link you posted, can be found in Autodesk Help. All functions can be used in CAL Command, table formulas and fields.

Similar Threads

  1. Extract a block's contour
    By bograd in forum AutoCAD General
    Replies: 10
    Last Post: 13th Oct 2014, 03:58 pm
  2. how to remove dynamic block's frame ?
    By cios106 in forum AutoCAD Beginners' Area
    Replies: 20
    Last Post: 14th May 2013, 06:15 pm
  3. Getting to a block's attributes using the block name
    By LispNovice in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 5th Jan 2011, 05:14 pm
  4. Dynamic updating block's attributes..
    By RoodyHood in forum AutoCAD Drawing Management & Output
    Replies: 20
    Last Post: 8th Apr 2010, 11:30 am
  5. D C Block's To A Palette
    By cad_student in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 2
    Last Post: 16th Jul 2009, 10:32 pm

Bookmarks

Posting Permissions

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