Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. For versions newer than 2021 you need to set the system variable LISPSYS to zero (LISPSYS=0) and restart AutoCAD for this and other older code I still use to function correctly. https://www.theswamp.org/index.php?topic=31584.msg608557#msg608557 He talked about a v5.0d version coming soon but I've never found it anywhere. He may have gotten frustrated when the code he put so much time into no longer worked as expected with AutoCAD's default settings.
  4. CyberAngel

    DXE file

    I guess it depends on which version you're using. At some point the wizard that creates your DXE file should give you the option of sorting on a column. You pick the column(s) and specify ascending or descending order. If that doesn't help, please provide more information. How are you creating the DXE file? What types of data are you extracting, and what are you doing with the data? Welcome to the forum!
  5. Select one of the layouts at the bottom of the window. You will see your paper space, possibly with a viewport included. If you don't have a viewport, use the VPORTS command to create one. Double-click in the viewport. That will put you in model space. Use the ZOOM Extents command. That should bring your linework into the center of the viewport. If you need to print to a scale, you'll have to adjust the viewport scale (one of its properties) or the size of the viewport itself or both. Once you have the viewport how you want it, plot it to your PDF plotter. The details will depend on the configuration of your system. It will take some experimentation the first time you do this. Don't be afraid to make mistakes. Welcome to the forum!
  6. There is a version 5.0d around, further down the page where you linked in your other post, it seems to address the issue. v5.0d ??cadffm?? ;;;; Revised regular expression for Height format - ;;;; e.g. for format like this: H0.400000 Also, John Uhden has an Unformat LISP he mentions in the same thread, that might do what you need. Please post your amended code if you don't mind, others may find it helpful.
  7. BIGAL, Sure! I would like to check out the reactor-based code. Make it available at your earliest convenience. Thanks, Clint
  8. If anyone wants to print a funnel for themselves, i have put both the petrol and diesel versions here: Fuel funnels.
  9. All the functions that use PEdit -> Multiple -> Join could (in my opinion) be improved by setting the fuzz to 0.0 in the code. Because if you just press enter "" after "_J" the previously used fuzz is used, which might give an undesired effect. An example of what can happen is shown in the image below. So just replace the "" after "_J" with "0.0", and the fuzz is always reset to 0: (command "_.pedit" "_m" ss "" "_j" "0.0" "")
  10. Thanks @BIGAL. Thought about that, that geometric center is not always inside polyline. Using QGIS, it also can label in center of polyline but it also have option "force point inside polygon". I'm curious about the algorithm that controls that. For me, most problem is "L" shape polylines. Thought that algorith in QGIS could be something like that it is finding geometric center or something like here in ATM code: https://jtbworld.com/autocad-areatext-lsp After finding center (geometric or like in ATM) it is finding intersection with horizontal (or vertical xlines). After that, sorting X (or Y for vertical) and find if center is before/inside/after X of intersection. After that, choose/calculate new X.
  11. I used Lee Mac's Unformat String, this one works. It does need some workaround when I use it on dimensions to not remove diameter symbols but that was an easy fix.
  12. Nice! Once I wrote a Lisp to draw and simulate the work of an Enigma machine. Unfortunately I can't make it work. It draws the machine on the screen, but when it comes to encrypt a text... well... it works only on my computer -from others I got only bug reports Anyway, that's an other example when there is nothing on the screen, the user starts a lisp and it makes the job.
  13. bgurcan

    2D CAD map of Las Vegas

    hello, is there a anyone up there have a idea where can i get some dwg of Leak Mead, i don't mind to pay as long as not overpriced. thanks
  14. Yesterday
  15. BIGAL

    Change attribute via lisp?

    What do you want to do maybe one of these. Copy atts in block to all similar blocks in layouts, fill in one 1 block attributes and blocks are updated in all layouts. Update sheet X of Y Update 1 attribute in all blocks using a dcl to select Please explain more. Ps make an Index from title blocks.
  16. "I am pretty sure John Uhden is still around." Sure is alive and kicking over at forums/autodesk. I will send a message to him asking to look at this post.
  17. There is a very advanced method using a reactor can type L4-25 and the ltscale will be set to that, L10, l2 etc. It uses an error trap in a reactor as what is typed does not exist so an error occurs, I currently have Circle, Offset and Fillet using this. You are limited to 26 options ie A-Z. C10 O5 F23 So in summing up if you have lots of ltscale to use could be helpful. Just ask.
  18. Whilst we wait for you Danial. Something like this. window frame.mp4
  19. This may help (setq pt (osnap (vlax-curve-getStartPoint obj) "gcen")) ; obj is a VL object But note if you have say a "U" shape pt may not be inside pline.
  20. Another example (defun wow ( / obj atts att) (setq obj (vlax-ename->vla-object (car (entsel "\nSelect a block object ")))) (setq atts (vlax-invoke obj 'Getattributes)) (foreach att atts (princ (strcat "\nTag name " (vlax-get att 'Tagstring) " Att value " (vlax-get att 'Textstring) )) ) (princ) ) (wow) If you know a tag string you can check for a single attribute.
  21. BIGAL

    Help: Insert Block lisp

    This will exit code if block does not exist (if (not (tblsearch "BLOCK" "POINT")) (progn (alert "The block POINT does not exist in this drawing.!!!\nPlease insert block POINT\n\nWill now exit") (exit)) )
  22. mhy3sx

    Help: Insert Block lisp

    This work better (if (not (tblsearch "BLOCK" "POINT")) (alert "The block POINT does not exist in this drawing.!!!\nPlease insert block POINT") )
  23. First post. Can the DXE file be in any order or is it stuck just ascending or descending?
  24. mhy3sx

    Help: Insert Block lisp

    HI Steven P.I fix the problem. I add in the beginning ((and (not POINT)) (alert (strcat "The block POINT does not exist in this drawing.")) ) Thanks
  25. Steven P

    Change attribute via lisp?

    would this help? https://lee-mac.com/macatt.html
  26. Steven P

    Help: Insert Block lisp

    So before the new 'if' line, what is the value of pnt? Add maybe (princ pnt) so you can see what it is. However consider the 6 lines just before this, pnt is always being set, either as (caddr pnt) or as dt1
  27. Lots of extra codes in that link to work around some of the problems as well. Maybe LeeMac's code will work for OP. If OP can't post the text, not much specific can be done IMHO.
  28. mhy3sx

    Help: Insert Block lisp

    I try this (defun c:myblock(/ lPointList scl scl1 dt1 pnt pointsToList) (command "_layer" "_m" "Block" "_c" "142" "" "") (defun pointsToList (/ ssPoints iCounter ePoint oPoint aAttributes vAttributes oPointTag sTag lPoints lCoord ) (setq ssPoints (ssget "X" '((0 . "INSERT") (2 . "POINT"))) iCounter 0 ) (repeat (sslength ssPoints) (if (and (setq ePoint (ssname ssPoints iCounter)) (setq oPoint (vlax-ename->vla-object ePoint)) (setq iCounter (1+ iCounter)) (= (vla-get-hasattributes oPoint) :vlax-true) (setq aAttributes (vla-getattributes oPoint)) (setq vAttributes (vlax-variant-value aAttributes)) (setq aAttributes (vlax-safearray->list vAttributes)) (setq oPointTag (car aAttributes)) (setq sTag (vla-get-textstring oPointTag)) (setq lCoord (vlax-safearray->list (vlax-variant-value (vla-get-insertionpoint oPoint)) ) ) ) (progn (setq lPoints (append lPoints (list (cons sTag (list oPoint lCoord))) ) ) ) ) ) lPoints ) (setq lPointList (pointsToList) scl (getvar "useri1") scl1 (* scl 0.0025) ) (while (progn (initget 128) (setq dt1 (getpoint "\n Insert Point or Number of point: ")) ) (progn (if (= 'STR (type dt1)) (setq pnt (assoc dt1 lPointList) pnt (caddr pnt) ) (setq pnt dt1) ) (if pnt (command "_.insert" "c:\\library\\myblock.dwg" pnt scl1 scl1 0) (alert "No POINT found") ) ) ) (princ) (command "setvar" "clayer" "0") ) But gives me Error: incorrect type - nil
  1. Load more activity
×
×
  • Create New...