Jump to content

TEXT IS OUTSIDE OF LINE FOR UCS CHANGE


Recommended Posts

Posted (edited)

 

 

(DEFUN C:FLR()

  (SETQ
    P1(GETPOINT "\n PICK FIELD LINE START POINT :")

    P2(GETPOINT P1 "\n PICK FIELD LINE END POINT :")

    P3(GETPOINT P1 "\n PICK RIGHT SIDE  :")

    AN1(ANGLE P1 P2)
    
    )
  (COMMAND "UCS" "3" P1 P2 P3 "")

  (REPEAT 100

    (SETQ
      
    GS(GETSTRING "\n FIELD LINE NUMBER :")
    
    YV(GETREAL "\n ENTER LINE LENGTH VALUE:") ;-15

    XV(GETREAL "\n ENTER OFFSET VALUE:") ;56.8

    ; FV(*(- YV)1)

    ;P2(POLAR P1 0 FV)
    )

  (COMMAND "POINT"  (LIST XV YV) )

  ;(TRANS '(0.0 0.0 1.0) 0 1  T)

  (ENTMAKE (LIST (CONS 0 "TEXT")
                   (CONS 100 "AcDbEntity")
                   (CONS 100 "AcDbText")
                   (CONS 10 (LIST XV YV)) ; POINT
                   (CONS 40 8)
                   (CONS 7 (GETVAR 'textstyle))
                   (CONS 8 "Some layer")
                   (CONS 62 1)
                   (CONS 1 GS) ;VALUE
                   (CONS 50 0 )
		 ))
)
 ;(PRINT FV)
  )

 

Edited by MUTHUKUMAR1983
VIDEO PROBLEM
Posted

I don't have CAD running today, but a couple of thoughts, 

For UCS - do you need it changed to this after the LISP ends? you might want to look at resetting it to what it was before. OR don't change the UCS and work out the points using polar coordinates from the UCS you had before and the line angle.

 

You could probably get rid off P3 if you do that and let the user define the direction of right by the order they click on the lines

Posted
30 minutes ago, MUTHUKUMAR1983 said:

 

 

 

(DEFUN C:FLR()

  (SETQ
    P1(GETPOINT "\n PICK FIELD LINE START POINT :")

    P2(GETPOINT P1 "\n PICK FIELD LINE END POINT :")

    P3(GETPOINT P1 "\n PICK RIGHT SIDE  :")

    AN1(ANGLE P1 P2)
    
    )
  (COMMAND "UCS" "3" P1 P2 P3 "")

  (REPEAT 100

    (SETQ
      
    GS(GETSTRING "\n FIELD LINE NUMBER :")
    
    YV(GETREAL "\n ENTER LINE LENGTH VALUE:") ;-15

    XV(GETREAL "\n ENTER OFFSET VALUE:") ;56.8

    ; FV(*(- YV)1)

    ;P2(POLAR P1 0 FV)
    )

  (COMMAND "POINT"  (LIST XV YV) )

  ;(TRANS '(0.0 0.0 1.0) 0 1  T)

  (ENTMAKE (LIST (CONS 0 "TEXT")
                   (CONS 100 "AcDbEntity")
                   (CONS 100 "AcDbText")
                   (CONS 10 (LIST XV YV)) ; POINT
                   (CONS 40 8)
                   (CONS 7 (GETVAR 'textstyle))
                   (CONS 8 "Some layer")
                   (CONS 62 1)
                   (CONS 1 GS) ;VALUE
                   (CONS 50 0 )
		 ))
)
 ;(PRINT FV)
  )

 

 

 

Posted

(entmake) have required alway coordinates in WCS

also

(CONS 10 (LIST XV YV)) ; POINT

is no good

(CONS 10 (trans (LIST XV YV) 1 0)) ; POINT

must be used

  • Like 1
Posted

ITS WORK FINE THANKS 1000 TIME Tsuky

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