Jump to content

Marking coordinates with number and paste to excel


anindya

Recommended Posts

NE (mleader) command

(defun c:NE (/ koord  xy)
 (vl-load-com)
 (while (and 
     (setq koord (getpoint "\nPoint <exit>")) 
   ) 
   (setq 
     xy   (strcat "E=" (rtos (nth 0 koord) 2 3)"\nN=" (rtos (nth 1 koord) 2 3)) 
   ) 
   (VL-cmdf "_mleader" koord pause  xy) 
 ) 
) 
(princ "\nType NE in command line")(princ)

Link to comment
Share on other sites

Respected sir i need to click every point one by one it will mark the coordinates(Easting & Northing) alongwith number and same time it will paste those coordinates in excel(SLNO,EASTING,NORTHING )heading.i can not do that .

Link to comment
Share on other sites

Sir,

 

Credits to the original programmer

(defun c:coo()
(princ "\nthis lsp to type the coordinate x,y & make table")  
(command "osnap" "cen,mid,endpoint,nea" )  

(setq p(getpoint "\n Enter First Point :")
     pp(getpoint "\n Enter Second Point :")      
     u(getint "\n Enter start point number:")
     tab(getpoint "\n Enter Upper Left Corner of Table:")            
     u1 (+ 1 u)
     x(car p)
     y(cadr p)
    ; z(caddr p)
     x1(car pp)
     y1(cadr pp)
    ; z1(caddr pp)
     text(strcat "(" (rtos x 2 3) "," (rtos y 2 3)")")
     text1(strcat "(" (rtos x1 2 3) "," (rtos y1 2 3) ")") 

;P1, P2 Distance from the Circle

     p1(mapcar '+ p (list 1 0.4))
     p2(mapcar '+ pp (list 1 0.4))
     p10(mapcar '+ p (list 1 -0.4))      
     p11(mapcar '+ pp (list 1 -0.4)) 
    

;  TABLE ROWLENGTH


     tab1(mapcar '+ tab (list 13.5 0 ))
     tab2(mapcar '+ tab (list 35 0 ))
     tab3(mapcar '+ tab (list 59.2 0 ))
     tab4(mapcar '+ tab (list 8 0 ))

;TABLE ROW HEIGHT

     tab5(mapcar '+ tab (list 0 -4.25))
     tab6(mapcar '+ tab1 (list 0 -4.25 ))
     tab7(mapcar '+ tab2 (list 0 -4.25))
     tab8(mapcar '+ tab3 (list 0 -4.25))
     tab9(mapcar '+ tab4 (list 0 -4.25))
     tab10(mapcar '+ tab5 (list 0 -4.25))
     tab11(mapcar '+ tab6 (list 0 -4.25))
     tab12(mapcar '+ tab7 (list 0 -4.25))
     tab13(mapcar '+ tab8 (list 0 -4.25))
     tab14(mapcar '+ tab9 (list 0 -4.25))
     tab15(mapcar '+ tab10 (list 0 -4.25))
     tab16(mapcar '+ tab11 (list 0 -4.25))
     tab17(mapcar '+ tab12 (list 0 -4.25))
     tab18(mapcar '+ tab13 (list 0 -4.25))
     tab19(mapcar '+ tab14 (list 0 -4.25))

;POINTs POISITION IN THE TABLE (P1,P2 ETC)

     POIN(mapcar '+ tab (list 1.9 -3.33))
     POIN1(mapcar '+ tab1 (list 1.9 -3.33))
     POIN2(mapcar '+ tab2 (list 1.9 -3.33))
     POIN3(mapcar '+ tab3 (list 1.9 -3.33))
     POIN4(mapcar '+ tab5 (list 1.9 -3.33))


;X,Y TEXT POSITION IN THE TABLE

     POIN5(mapcar '+ tab6 (list 8.5 -2))
     POIN6(mapcar '+ tab7 (list 8.5 -2))
     POIN7(mapcar '+ tab8 (list 8.5 -2))




;GAP (ROW HEIGHT) BETWEEN P1 TO P2

     POIN8(mapcar '+ poin4 (list 0 -4.25))
     POIN9(mapcar '+ poin5 (list 0 -4.25))
     POIN10(mapcar '+ poin6 (list 0 -4.25))
     POIN11(mapcar '+ poin7 (list 0 -4.25))


;FIRST 2 POINTS (EX P1 + P2)

     uu(strcat "P " (itoa u) )
     uu1(strcat "P " (itoa u1) )
)


(command "osnap" "none" )  
(command "style" "rockstyle" "arial"  "0.9" "1" "0" "n" "n" "n" "")
(command "line" tab tab3 "")
(command "line" tab5 tab8 "")
(command "line" tab10 tab13 "")
(command "line" tab15 tab18 "")
(command "line" tab tab15 "")
(command "line" tab1 tab16 "")
(command "line" tab2 tab17 "")
(command "line" tab3 tab18 "")


;Circle radious

(command "circle" p "0.7" )

;circle color is 10

(command "change" "l" "" "p" "c" "10" "")
(command "circle" pp "0.7" )
(command "change" "l" "" "p" "c" "10" "")

;POINT 1 EX: P1

(command "text" p10 "0"  uu "")

;POINT 2 EX: P2

(command "text" p11 "0"  uu1 "")


(command "style" "rockstyle" "arial"  "2.5" "1" "0" "n" "n" "n" "")

(command "text" poin "0"  "POINT" "")  
(command "text" poin1 "0"  "X" "")
(command "text" poin2 "0"  "Y" "")
;(command "text" poin3 "0"  "Z" "")
(command "text" poin4 "0" uu "")
(command "text" poin8 "0" uu1 "")


(command "text" "j" "mc" poin5 "0" (rtos x 2 3) "")
(command "text" "j" "mc" poin6 "0" (rtos y 2 3) "")
(command "text" "j" "mc" poin9 "0" (rtos x1 2 3) "")


(command "text" "j" "mc" poin10 "0" (rtos y1 2 3) "")
(command "osnap" "cen,mid,endpoint,nea" )    
 (command "osnap" "cen,mid,endpoint,nea" )
 (setq  ppp(getpoint "\n Enter Next Point :")       )
 (while ( /= ppp nil )
   (progn
     (setq
;increase the point numbers
       u1 (+ 1 u1)
       x1(car ppp)
       y1(cadr ppp)
;       z1(caddr pp)

       text1(strcat "(" (rtos x1 2 3) "," (rtos y1 2 3) ")") 
       p2(mapcar '+ ppp (list 1 0.2))


;Distance from the circle x=0.4, y=0.2


       p11(mapcar '+ ppp (list 1 -0.2)) 


;STARTING FROM P3  (4.3 is the ROW WIDTH)

       uu1(strcat "P " (itoa u1) )
       tab15(mapcar '+ tab15 (list 0 -4.25))
       tab16(mapcar '+ tab16 (list 0 -4.25))
       tab17(mapcar '+ tab17 (list 0 -4.25))
       tab18(mapcar '+ tab18 (list 0 -4.25))
       tab19(mapcar '+ tab19 (list 0 -4.25))
       POIN8(mapcar '+ poin8 (list 0 -4.25))
       POIN9(mapcar '+ poin9 (list 0 -4.25))
       POIN10(mapcar '+ poin10 (list 0 -4.25))
       POIN11(mapcar '+ poin11 (list 0 -4.25))

     );setq


;Circle radious


(command "osnap" "none" )  
    (command "circle" ppp "0.7" )

;circle color is number 10
    (command "change" "l" "" "p" "c" "10" "")

(command "style" "rockstyle" "arial"  "0.9" "1" "0" "n" "n" "n" "")
    

;THIS TEXT EX: P3 TO N

    (command "text" p11 "0"  uu1 "")


;TEXT FROM P3 X & Y POINTS

(command "style" "rockstyle" "arial"  "2.5" "1" "0" "n" "n" "n" "")
(command "text" poin8 "0" uu1 "")
(command "text" "j" "mc" poin9 "0" (rtos x1 2 3) "")
(command "text" "j" "mc" poin10 "0" (rtos y1 2 3) "")
(command "line" tab15 tab18 "")


    (setq pp ppp
          ;u1 (+ 1 u1)
    );setq
 (command "osnap" "int,cen,mid,endpoint" )
    (setq  ppp(getpoint "\n Enter Next Point :")  )
    );progn
 )   ;while
 (command "osnap" "none" )
(command "line" tab tab15 "")
(command "line" tab1 tab16 "")
(command "line" tab2 tab17 "")
(command "line" tab3 tab18 "")


(command "osnap" "cen,mid,endpoint,nea" )  
 );end

Link to comment
Share on other sites

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