See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Automatic Y coordinate block

  1. #1
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Automatic Y coordinate block

    Hello Everyone

    Is there any way to create dynamic block (or some other solution) with elevation symbol and text with y coordinate value above it? The goal is to create block who upon insertion updates the value of the y coordinate. The value (y coordinate) should be the bottom point of elevation symbol.

    elevation symbol.png

    I would usualy using ordinate dimension, but I have may dimensions to place.

    Sry on may not so good english, it's not my native

    Kind Regards!

  2. #2
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    1

    Default Re: Automatic Y coordinate block

    Yes, make a block with the Y coordinate as an attribute. Right click in the attribute default value and select Insert Field. In the left column choose BlockPlaceholder. In the center column choose Position. On the right, uncheck the X and Z, and set the precision to 0.00. Test the block. The attribute will update to show the current Y location of it's insertion point. (you'll need to regen for it to update)

  3. #3
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    I was on this trace before, but I was unsuccessfull

    Now it's working, thanks

    Just dont know how to set precision to 0.00. Don't see option anywhere

  4. #4
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    on the right side there should be a column to set the value as a decimal. Once that is set you'll get the option to choose the precision.

  5. #5
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    thats it, many thanks

  6. #6
    Member
    Join Date
    2017-08
    Posts
    19
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    Quote Originally Posted by Cro_CAD View Post
    Hello Everyone

    Is there any way to create dynamic block (or some other solution) with elevation symbol and text with y coordinate value above it? The goal is to create block who upon insertion updates the value of the y coordinate. The value (y coordinate) should be the bottom point of elevation symbol.

    elevation symbol.png

    I would usualy using ordinate dimension, but I have may dimensions to place.

    Sry on may not so good english, it's not my native

    Kind Regards!

    Maybe this can help. Block with attribute.



    Or a lisp routine



    Code:
    ;TRIANGULO CON Y
    
    (defun CON (a)					
    (* PI (/ a 180.0))
    );defun	 
    
    (defun C:Y (/  rat ort ph d1 d2 opr  r1  r1y p_ros vay mt_y r2 r3)
    
    ;Guarda y establece variables________________________________________________________________
    (setq rat (getvar 'textsize))
    (setq ort (getvar ' orthomode))
    (setvar 'orthomode 1)
    (setvar 'tspacefac 1) 
    (setvar 'luprec 2)
    
    (command "style" "COTASY" "ARIAL ROUNDED MT BOLD" "0" "" "12" "" "" );Estilo de texto
    
    ;Establece altura de texto _____________________________________________________________________
    
    (setq ph (getdist "\nAltura de Texto: <0.18>: ")
    	ph (if (null ph) 0.18 ph))
    (setvar 'textsize ph)
    
    (setq d1 ( * ph 2.0))
    (setq d2 ( * ph 6.6))
    
     ;if OTRO 1=_________________________________________________________________________________
    (defun r_r (/ p_ros )
    (setq p_ros (getstring t "\nQue prefijo: <Y=>: ")
    	p_ros (if (null p_ros) Y= p_ros))
    (while 
    (setq r1 (getpoint "\nQUE PUNTO: "))
    (setq r1y (cadr r1)) ;coordinada en y
    (setq vay (rtos r1y 2 2))
    (setq mt_y (strcat p_ros "" vay ))
    (setq r2 (polar r1 (CON 90.0) d1))
    (setq r3 (polar r1 (CON 90.0) (+ d1 (* d1 0.20))))
    (command "pline" r1 "w" 0.0 d2 r2 "")
    (command "mtext" r3  "j" "bc" "r" "0" "w" "0" mt_y "")  
    );while
    );end r__r
    
    
    
      (initget "Y OTRO")
          (setq opr (getkword "\nQue prefijo para la cota en Y [Y/OTRO] <Y=>: "))  
    
    (if (= opr "OTRO") (r_r) );end if    
    
    (while 
    (setq r1 (getpoint "\nQUE PUNTO: "))
    (setq r1y (cadr r1)) ;coordinada en y
    (setq vay (rtos r1y 2 2))
    (setq mt_y (strcat "Y= " vay ))
    (setq r2 (polar r1 (CON 90.0) d1))
    (setq r3 (polar r1 (CON 90.0) (+ d1 (* d1 0.20))))
    (command "pline" r1 "w" 0.0 d2 r2 "")
    (command "mtext" r3  "j" "bc" "r" "0" "w" "0" mt_y "")  
    );while
    Attached Files Attached Files

  7. #7
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    Hello,

    new problem

    Now I need y coordinate reduced for certain value (I want relative ordinate dimension [drawing is in apsolute coordinate system]).

    Any ideas?

    Kind Regards!

  8. #8
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    Relative to .... ?

    You could add a User Parameter for use in a formula to provide a conversion from an absolute coordinate to a converted/relative value.

  9. #9
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    Now I have y coordinate same as altitude in our coordinate system (HTRS96). What I want is that height is the same as apsolute altitude, but blocks shows it reduced for xyz m so i have ground floor height labeld as +-0,00m.

  10. #10
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    0

    Default Re: Automatic Y coordinate block

    Edit the block to have an XY Move parameter set. Edit the attribute field to be the value of the Distance Y parameter.

    Usage: Place the block at the location of your chosen 0,0,0 location then move it with the grip to the desired location. Regen and the attribute will display the Y distance from its insertion point to where the grip was placed.

Page 1 of 2 12 LastLast

Similar Threads

  1. Coordinate Block
    By Chaos Dimention in forum Dynamic Blocks - Technical
    Replies: 0
    Last Post: 2016-05-25, 07:18 PM
  2. x,y coordinate block
    By Maverick91 in forum AutoCAD General
    Replies: 19
    Last Post: 2012-07-01, 10:00 AM
  3. Using block's x-coordinate to get station
    By rjohnson42 in forum AutoCAD Fields
    Replies: 1
    Last Post: 2012-05-23, 11:45 AM
  4. excel coordinate based block insertion
    By canadianpaddler in forum AutoCAD Map 3D - General
    Replies: 5
    Last Post: 2008-08-23, 02:39 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
  •