Jump to content

All Activity

This stream auto-updates

  1. Today
  2. It's causing a plotting issue. The way I work is, model space set to meters and scale is 1:1_1. Paper space is in millimeters. I then set the viewport scale to be whatever I want it to be. I've worked like this since starting using AutoCAD some 25 years ago. Occasionally I get sent a file where this doesn't work and when I look into it, the problem is that for scale 1:1_1 it's set to '1 paper unit = 0.001' drawing unit'. This makes the viewport scale1000 times larger. If I could edit it to be '1 paper unit = 1 drawing unit' it wouldn't be a problem but it won't allow me to edit it. If I'm plotting something at 1:5000 I have to pick the scale 1:5 as a work around.
  3. There probably is a post like this since it is quite a generic theme, but I didn't find it. OK, so I can't write to excel on LT, but I can write to a .csv; all I need to do is write values then retrieve them through Excel, a .csv should be enough for that, right? Anyway thanks a lot BIGAL.
  4. No worries @pavanetc, just need to know everytime that when you need something, you need to make a good explanation, provide an example drawing and be flexible in explanation to others understand the problems whom you meet. Best regards.
  5. Was this posted elsewhere ? Ok first answer you can not use LT2024+ as it does not support the "get application" method. Acad full or Bricscad plus others etc are fine. For LT2025 must use read / write a csv. Happy to provide lots of defuns re Excel to and from but not for LT.
  6. This might be too general for a question, but how can you pass a string to a certain cell in an Excel file? Is there any good tutorial out there that you know about Excel and AutoLISP?
  7. Agree with that @BIGAL . As @SLW210 mentioned and also agree with that, the @pavanetc need to provide more information if he want to get the best results from lisp.
  8. hi engineers! It was amazing!!! great work, I really appreciate everyone in the Lisp community. I was able to relax and forget everything for a while; your code was like a shot of coffee. Thanks to everyone for your time and effort. I’m new to posting topics here, so please forgive me if I made any mistakes. I need to learn lot from yours.....
  9. Buenos días Bigal, esa forma si lo sabia colocándole un guion al final del nombre del fichero de autocad "TOMO_", pero cuando quiero publicar al mismo tiempo en PDF, lo tengo que volver a renombrar sin "-" si no me sale con doble "-" osea TOMO--001.pdf. Siento molestarte, pero muchas gracias.
  10. Yesterday
  11. I am like others as suggested dont use a command word, as your wanting to use a defun then why not just call the defun something shorter, like CENTL.You can use AUTOLOAD to load the actual lisp at the first time you type centl. You would put the "Autoload" in say a custom lisp that is loaded on startup, along with your other AUTOLOAD's (autoload "CENTL" '("CENTL")) (autoload "COPY0" '("COPY0")) (autoload "COPYCOMMAND" '("ZZZ")) (autoload "COVER" '("COVER"))
  12. Need some more info, are you talking about plotting settings, we worked in metres, and when plotting just set the 1 printed unit = 1 drawing units, our title block was a A1 and if you checked the size of the title block in a layout it was 641x594. For A3 did 1 print = 2 drawing. Or is it annotation scaling ?
  13. When asked for a sample dwg you can often use WBLOCK to save a little bit of a dwg into a new dwg, like your text. Then it's not a company copyright problem.
  14. Added the "-" to file name, code updated above.
  15. @Saxlle just a suggestion as the "Points' may not be just that a Autocad "Point" often they are a block. (setq ss (ssget (list (cons 0 "POINT"))) len (sslength ss) x_spacing 1 i 0 ) (while (< i len) (setq ss (ssget (list (cons 0 "POINT"))) (if (= ss nil) (progn (alert "You have not selected any Points \nWill now exit please check objects ") (exit) ) ) (setq len (sslength ss) x_spacing 1 i 0 ) (repeat len
  16. Thank you for your kind words. Someday P-F might get their act together and address the problems with their project instructions and their so-called instructors. Good luck in your endeavors now and in the future.
  17. troggarf

    Viewport Inset Generator

    For Key maps, I use two routines: 1. Lee's Viewport outline https://lee-mac.com/vpoutline.html 2. Change Space Copy (defun c:CHSpaceCopy (/ ss2 ss i) (vl-load-com) (if (setq ss2 (ssadd) ss (ssget "_:L") ) (progn (repeat (setq i (sslength ss)) (ssadd (vlax-vla-object->ename (vla-copy (vlax-ename->vla-object (ssname ss (setq i (1- i)))) ) ) ss2 ) ) (vl-cmdf "_.chspace" ss2 "") ) ) (princ) )
  18. Got it. And thank you all that you did to help others over the years. Even though it's been 12 years, , it's still helping me and I'm sure others too. PF sure hasn't given us the resources we need, along with confusing instructions. But at least they have made changes to things. So many thanks!
  19. Re: Bar scale construction. I used the Rectangle, Line and Hatch commands. Yes, the scale is for the whole subdivision drawing. The correct scale for the title block and border is 50 and not 58. Re: Lot lines. I used the supplied property line dimensions as provided in the instructions.
  20. Why did you report my post? It was meant for an example for you to learn to help yourself. Do you even know what you want? Your first example drawing doesn't show XYZ for the "NEED SOMETHING LIKE AT ALL POINT". Not sure why you want someone to do a bunch of work for you for free and you can't be bothered to provide a well though out request and provide appropriate examples and comments.
  21. @pavanetc I hope this is what you want to accomplish. Try this code: (prompt "\nTo run a LISP type: XYZTEXT") (princ) (defun c:XYZTEXT ( / old_osmode ss len x_spacing i pt) (setq old_osmode (getvar 'osmode)) (setvar 'osmode 0) (if (not (tblsearch "LAYER" "Coor Text")) (command-s "-layer" "m" "Coor Text" "c" 7 "" "") (setvar 'clayer "Coor Text") ) (prompt "\nSelect the POINTS:") (princ) (setq ss (ssget (list (cons 0 "POINT"))) len (sslength ss) x_spacing 1 i 0 ) (while (< i len) (setq pt (strcat "X=" (rtos (cadr (assoc 10 (entget (ssname ss i)))) 2 2) "\n" "Y=" (rtos (caddr (assoc 10 (entget (ssname ss i)))) 2 2) "\n" "Z=" (rtos (cadddr (assoc 10 (entget (ssname ss i)))) 2 2))) (entmake (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 (list (+ (cadr (assoc 10 (entget (ssname ss i)))) x_spacing) (caddr (assoc 10 (entget (ssname ss i)))) (cadddr (assoc 10 (entget (ssname ss i)))))) (cons 1 pt) (cons 40 0.20) (cons 50 0) (cons 71 4))) (setq i (1+ i)) ) (setvar 'osmode old_osmode) (prompt "\nThe X, Y and Z values were added near the points!") (princ) ) You will get something like this from picture below (the yellow XYZ values is what you will get, the white text behind the yellow is your's). Best regards.
  22. But just in case you are using Civil, try to prune out as many points as you can. They take up approximately 1K apiece. One thousand points = 1MB of space. It adds up.
  23. Somehow I erased some of my lines... How did you come up with the radius for the circles on Lots 5 and 6?
  24. sorry engineers. I am posting this again to clarify my exact requirement. Please check the attached DWG file. The text placement location may be at the top, bottom, or canter, but it must be positioned close to the points and without arrows. I need the XYZ coordinates for all points displayed in a single SHOT Thanks for your time SAMPLE 2.dwg
  25. That is only available in Civil 3D AFAIK, not much use for someone with AutoCAD 2010.
  26. Maybe something in this thread will help. REQUIRE LISP 3-IN-1 FOR (XYZ COORDINATES WITH LEADER) - AutoLISP, Visual LISP & DCL - AutoCAD Forums
  27. Not quite sure what the question is to be 'exactly like 2' - is it the text to be offset to one side? (only difference I can see really), else EnM4st3r works for me. If you want to offset the text from the selected point, use the mapcar function, have a go at changing the code offered perhaps changing this line (vla-addmtext (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) (vlax-3d-point pt) 0 str) use (mapcar '+ '(x y z) pt) instead of pt where x, y and z are the offset distances (numbers) in each direction Hint with LISPs, 'pt' or very similar is often used as a variable for a point, you can check earlier in the code to confirm, getpoint is the LISP command to return a selected point, pt is set to be the output from getpoint... so a good guess would be this is the point to change Have a go, your first steps to write LISPs is to try, if it all goes wrong ask and we are all more than happy to guide you if you are happy to change things yourself.
  1. Load more activity
×
×
  • Create New...