Jump to content

I need a LISP or Tool Pac for placing Cordinate point


afrazawan

Recommended Posts

pls any one can help me i need a good LISP or Toolpac for placing cordinate point or any level pls urgently suppose any point i clik i get N: E: point with leader in center

Link to comment
Share on other sites

Check this out Buddy .:)

 

(defun c:TesT (/ *error* hgt cmd i icar icadr icaddr pt1 pt2 e)
 ; Tharwat 01. 05. 201
 (defun *error* (msg)
 (and cmd (setvar 'cmdecho cmd))
 (redraw)
 (if (and msg (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*QUIT*,")))
   (princ (strcat "\nError: " msg))
 )
)
 (setq Sty (tblnext "STYLE" (null Sty)))
 (setq cmd (getvar 'cmdecho))
 (setvar 'cmdecho 0)
       (while
           (setq i (getpoint "\n Specify Corrdinates Point :")
            icar (car i)
            icadr (cadr i)
                icaddr (caddr i))
            (setq pt1 (getpoint "\n Second point of QLeader :" i ))
            (grdraw i pt1 3 1)
            (setq pt2 (getpoint "\n Last point of QLeader :" pt1 ))

 (entmakex (list (cons 0 "LEADER") (cons 100 "AcDbEntity") (cons 100 "AcDbLeader")
         (cons 10 i)(cons 10 PT1)(cons 10 PT2)(cons 71 1)(cons 72 0)(cons 73 3)))

 (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 (trans pt2 1 0))
           (cons 40 (cdr (assoc (if (zerop (cdr (assoc 40 Sty))) 42 40) Sty )))
           (cons 1 (strcat "N" ":" (rtos icar 2 0) "\n" "E" ":" (rtos icadr 2 0)))))
 
     (redraw)

      )
 (setvar 'cmdecho cmd)
 (princ)
 )
 

 

TharwaT

Link to comment
Share on other sites

Check this out Buddy .:)

 

(defun c:TesT (/ *error* hgt cmd i icar icadr icaddr pt1 pt2 e)
; Tharwat 01. 05. 201
(defun *error* (msg)
(and cmd (setvar 'cmdecho cmd))
(redraw)
(if (and msg (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*QUIT*,")))
(princ (strcat "\nError: " msg))
)
)
(setq Sty (tblnext "STYLE" (null Sty)))
(setq cmd (getvar 'cmdecho))
(setvar 'cmdecho 0)
(while
(setq i (getpoint "\n Specify Corrdinates Point :")
icar (car i)
icadr (cadr i)
icaddr (caddr i))
(setq pt1 (getpoint "\n Second point of QLeader :" i ))
(grdraw i pt1 3 1)
(setq pt2 (getpoint "\n Last point of QLeader :" pt1 ))

(entmakex (list (cons 0 "LEADER") (cons 100 "AcDbEntity") (cons 100 "AcDbLeader")
(cons 10 i)(cons 10 PT1)(cons 10 PT2)(cons 71 1)(cons 72 0)(cons 73 3)))

(entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 (trans pt2 1 0))
(cons 40 (cdr (assoc (if (zerop (cdr (assoc 40 Sty))) 42 40) Sty )))
(cons 1 (strcat "N" ":" (rtos icar 2 0) "\n" "E" ":" (rtos icadr 2 0)))))

(redraw)

)
(setvar 'cmdecho cmd)
(princ)
)

 

TharwaT

 

 

 

brother not this one any pther lisp pls i cant get it thanks

Link to comment
Share on other sites

brother not this one any pther lisp pls i cant get it thanks

 

Is it hard to describe what you looking for in a little details ?

Link to comment
Share on other sites

Is it hard to describe what you looking for in a little details ?

 

Your lisp looks pretty good to me. Seems to do everything the OP wanted as I interpreted his post to be also.

Link to comment
Share on other sites

Your lisp looks pretty good to me. Seems to do everything the OP wanted as I interpreted his post to be also.

 

Thanks Dink .

 

I guess that the OP feels hard to describe his aim . :)

Link to comment
Share on other sites

see i want to get cordinate E: and N: so pls this is sample

 

Tharwat's lisp does give you Eastings and Northings.

 

Are you saying you want it labeled Easting first, then Northing instead of N, E?

Link to comment
Share on other sites

This is with Easting first and Northing Later . :D

 

(defun c:TesT (/ *error* hgt cmd i icar icadr pt1 pt2 e)
                                       ; Tharwat 01. 05. 201
 (defun *error* (msg)
   (and cmd (setvar 'cmdecho cmd))
   (redraw)
   (if (and msg
            (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*QUIT*,"))
       )
     (princ (strcat "\nError: " msg))
   )
 )
 (setq Sty (tblnext "STYLE" (null Sty)))
 (setq cmd (getvar 'cmdecho))
 (setvar 'cmdecho 0)
 (while
   (setq i     (getpoint "\n Specify Corrdinates Point :")
         icar  (car i)
         icadr (cadr i)
   )
    (setq pt1 (getpoint "\n Second point of QLeader :" i))
    (grdraw i pt1 3 1)
    (setq pt2 (getpoint "\n Last point of QLeader :" pt1))

    (entmakex (list (cons 0 "LEADER")
                    (cons 100 "AcDbEntity")
                    (cons 100 "AcDbLeader")
                    (cons 10 i)
                    (cons 10 PT1)
                    (cons 10 PT2)
                    (cons 71 1)
                    (cons 72 0)
                    (cons 73 3)
              )
    )

    (entmakex
      (list (cons 0 "MTEXT")
            (cons 100 "AcDbEntity")
            (cons 100 "AcDbMText")
            (cons 10 (trans pt2 1 0))
            (cons 40
                  (cdr (assoc (if (zerop (cdr (assoc 40 Sty)))
                                42
                                40
                              )
                              Sty
                       )
                  )
            )
            (cons 1
                  (strcat "E"
                          ":"
                          (rtos icar 2 0)
                          "\n"
                          "N"
                          ":"
                          (rtos icadr 2 0)
                  )
            )
      )
    )

    (redraw)

 )
 (setvar 'cmdecho cmd)
 (princ)
)

Link to comment
Share on other sites

Make a block..

 

AttBlock.gif

 

 

BTW, Tharwat, you should consider translating your coordinates before converting them to a string.

Link to comment
Share on other sites

Make a block..

 

AttBlock.gif

 

 

BTW, Tharwat, you should consider translating your coordinates before converting them to a string.

 

@alnjt

 

what software did you use to make your animation?

Link to comment
Share on other sites

great...but I was looking for something more open source like...I googled a bit to see what is out there on the market...the screencasts that you, Lee Mac and others have made really made me think about screencasting some of the AutoLisp programs and the functionality they have that I've made over the years...your videos/animations really show off some good programs!

Link to comment
Share on other sites

great...but I was looking for something more open source like...I googled a bit to see what is out there on the market...the screencasts that you, Lee Mac and others have made really made me think about screencasting some of the AutoLisp programs and the functionality they have that I've made over the years...your videos/animations really show off some good programs!

 

I found this:

http://camstudio.org/

Link to comment
Share on other sites

 

BTW, Tharwat, you should consider translating your coordinates before converting them to a string.

 

Thanks Alanjt .

 

I have always forget translating coordinates .

 

BTW. how do you convert from camtasia format to .gif format ?

 

Regards

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