Lrees Posted October 2, 2009 Posted October 2, 2009 Just another quick question. How would i go about putting the coorinates of a point on the drawing. So when I id a point, i can put a label of its value on the drawing? Thanks for any info Quote
Tiger Posted October 2, 2009 Posted October 2, 2009 On my way out of the door now, but if you search in the VBA, lisp and Customization part of the forum, there is a lisp in there called CR.lsp written by Lee Mac (do a search on that forum on threads started by Tiger and you should find it at the top of the list) that does just that. Quote
eldon Posted October 2, 2009 Posted October 2, 2009 I think you could explore FIELDS where you can put an x,y coordinate at the ends of lines. Or there is Ordinate dimension, which only gives you an x coordinate or a y coordinate at a time (depending on which way you pull the crosshair). Or you could find a lisp programme which can write a point number in the drawing, and write that point number with the x,y,z coordinates into an external file. It leaves less room for error if you can get the computer to write coordinates, rather than writing and then entering numbers manually. Quote
eldon Posted October 2, 2009 Posted October 2, 2009 Instead of adding to an ancient thread (which makes following very difficult), you could try going to Asmi's site where his lisp ordi.lsp will do what you want it to. Quote
Lrees Posted October 2, 2009 Author Posted October 2, 2009 Well I thought adding to a thread which has a good few members who are all on about a similar sort of thing would be a sensible idea. Appologise if it was too difficult to follow but i copied the exact .lsp that I was talking about into my post. So it should have explained it all really. Anyway, thanks for that site, very usefull! It's only the last 2 day's I have tried to improve my ability on AutoCAD (been at a very basic stage for along time) That LSP is what I am after, but for some reason, when i select a point and then go to plot the xy coordinates, the line does not come from the exact point, but is offset by 40. Had a quick look at the lsp in notepad, and can't see anything refering to this. I am running AutoCAD2009 Quote
eldon Posted October 2, 2009 Posted October 2, 2009 That is because the lisp is based on the dimensioning in AutoCAD, and the offset you are seeing is the extension line offset. If you go into Format, Dimension style, Lines and Arrows, Extension Lines, you will be able to set this offset from origin to 0, and then you will have no gap. Quote
N_461 Posted December 2, 2010 Posted December 2, 2010 Hey do you have this lisp? I was wondering if you could share it? The link for asmi's site is no longer valid ...apparantly. Thanks! Quote
shoaib Posted January 9, 2011 Posted January 9, 2011 thncx i chk this file its good if u have another files same like this so plz share at this page plzzzz Quote
Lee Mac Posted January 9, 2011 Posted January 9, 2011 Another very simple one: [b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] c:mpt [b][color=RED]([/color][/b] [b][color=BLUE]/[/color][/b] _MText norm pt [b][color=RED])[/color][/b] [i][color=#990099];; © Lee Mac 2010[/color][/i] [b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] _MText [b][color=RED]([/color][/b] pt val norm [b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]entmakex[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]list[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]0[/color][/b] [b][color=#a52a2a]"MTEXT"[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]100[/color][/b] [b][color=#a52a2a]"AcDbEntity"[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]100[/color][/b] [b][color=#a52a2a]"AcDbMText"[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]10[/color][/b] pt[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]11[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]getvar[/color][/b] [b][color=DARKRED]'[/color][/b]UCSXDIR[b][color=RED]))[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]1[/color][/b] val[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]210[/color][/b] norm[b][color=RED])[/color][/b] [b][color=RED])[/color][/b] [b][color=RED])[/color][/b] [b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] norm [b][color=RED]([/color][/b][b][color=BLUE]trans[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=RED]([/color][/b][b][color=#009999]0.[/color][/b] [b][color=#009999]0.[/color][/b] [b][color=#009999]1.[/color][/b][b][color=RED])[/color][/b] [b][color=#009900]1[/color][/b] [b][color=#009900]0[/color][/b] [b][color=BLUE]t[/color][/b][b][color=RED]))[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]terpri[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]while[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] pt [b][color=RED]([/color][/b][b][color=BLUE]getpoint[/color][/b] [b][color=#a52a2a]"\rSpecify Point: "[/color][/b][b][color=RED]))[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] pt [b][color=RED]([/color][/b][b][color=BLUE]trans[/color][/b] pt [b][color=#009900]1[/color][/b] [b][color=#009900]0[/color][/b][b][color=RED]))[/color][/b] [b][color=RED]([/color][/b]_MText pt [b][color=RED]([/color][/b][b][color=BLUE]apply[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]strcat[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]strcat[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=RED]([/color][/b][b][color=#a52a2a]"X = "[/color][/b] [b][color=#a52a2a]"\nY = "[/color][/b] [b][color=#a52a2a]"\nZ = "[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]rtos[/color][/b] pt[b][color=RED]))[/color][/b] [b][color=RED])[/color][/b] norm [b][color=RED])[/color][/b] [b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b][b][color=RED])[/color][/b] [b][color=RED])[/color][/b] Quote
shoaib Posted January 9, 2011 Posted January 9, 2011 i cant go through like this style i dont no how to put like this text in cad sorry for this question, Quote
Lee Mac Posted January 9, 2011 Posted January 9, 2011 I don't understand. Do you not know how to load the LISP code? If not, see here. Quote
Recommended Posts
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.