Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/04/2022 in all areas

  1. Anything after a '( is a fixed list, CAD will take it as it is, anything after (list and CAD will try to calculate this list For example '( 1 2 3 4 5) is a list, 1 2 3 4 5 '(1 (+ 8 9) 3 4 5) is also a list 1 (+ 8 9) 3 4 5, and will probably be an error since it thinks the + is text, and wants it as "+" (list 1 2 3 4 5) is also a list 1 2 3 4 5 (list 1 (+ 8 9) 3 4 5 is a list 1 17 3 4 5, noting that the 8+9 has been calculated now That's the basic difference Remember to define any lists within your list as a list too In your case '( "" (strcat (getenv "userprofile") "\\OneDrive\\....\\01_Profiles\\") (strcat (getenv "userprofile") "\\OneDrive\\....\\02_Gaskets\\") ) this list is seen as all text items, errors for example (strcat CAD wants that to be a text string "(strcat....) Make it up as (list "" (strcat (getenv "userprofile") "\\OneDrive\\....\\01_Profiles\\") (strcat (getenv "userprofile") "\\OneDrive\\....\\02_Gaskets\\") ) and it should work it all out. Lee Macs description is better than mine
    3 points
  2. in laymen terms what tombu is saying '((strcat (getenv "userprofile") "\\OneDrive\\....\\01_Profiles\\") (strcat (getenv "userprofile") "\\OneDrive\\....\\02_Gaskets\\")) with the ' it only outputs what is in the list strcat (getenv "userprofile") "\\OneDrive\\....\\01_Profiles\\" strcat (getenv "userprofile") "\\OneDrive\\....\\02_Gaskets\\" (list (strcat (getenv "userprofile") "\\OneDrive\\....\\01_Profiles\\") (strcat (getenv "userprofile") "\\OneDrive\\....\\02_Gaskets\\")) where list runs the starcat and getenv funtions to output C:\\Users\\username\\OneDrive\\....\\01_Profiles\\ C:\\Users\\username\\OneDrive\\....\\02_Gaskets\\
    2 points
  3. The " quote doesn't evaluate list items like the list (AutoLISP) function does, you need to use list instead. Lee Mac explains The Apostrophe and the Quote Function pretty well.
    2 points
  4. @mhupp Nice code FWIW, when you're checking if the item exists in the 'lst' you could also use OR logic like so: (or (assoc x lst) (setq lst (cons (cons x link) lst)))
    1 point
  5. Ah, the old EXTENDED ASCII CHARACTER set. Cool, that works great with 3/4" but what if I have 7/8" or 23/32" a number which is not an Extended Ascii character?
    1 point
  6. I've found a way to make it work but it's more by luck and your guidance. Thanks again. Part of this lisp: (defun findblock ( dwg ) (vl-some '(lambda ( p ) (findfile (strcat p dwg))) (list (strcat (getenv "userprofile") "\\OneDrive\\....\\01_Profiles\\") (strcat (getenv "userprofile") "\\OneDrive\\....\\02_Gaskets\\") )))
    1 point
  7. Thanks A bit complicated for my lisp notions, but I'll try
    1 point
  8. (strcat (getenv "userprofile") "\\OneDrive\\.....\\01_Profiles") --edit in windows explorer its %USERPROFILE%
    1 point
  9. Did you look at publish ? If you make a script that opens the dwg then runs a plot lisp that plots all layouts then yes can be done. Attached is a lisp for plot layouts by range but could have that part removed. So use scriptpro to write the script. There is plenty of plot examples out there just need the repeat for number of layouts added.plotA3Pdfrange.lsp Google Maratovich Plotting has a excellent plot product. Ps for my code to work expects the title to be at 0,0, but have a move all layouts title block to 0,0 to fix problem if you need post, you need to edit the code to suit your title block.
    1 point
  10. This should do it. (setq obj (vlax-ename->vla-object (car (entsel "\nSelect Line : "))) len (rtos (LM:roundm (vlax-get-property obj 'length) 5) 2 0) ) ;; Round Multiple - Lee Mac ;; Rounds 'n' to the nearest multiple of 'm' (defun LM:roundm ( n m ) (* m (fix ((if (minusp n) - +) (/ n (float m)) 0.5))) ) --edit I'm getting nil for pt if your calculating midpoint try this. (setq pt (mapcar '/ (mapcar '+ (vlax-get obj 'startpoint) (vlax-get obj 'endpoint)) '(2 2)))
    1 point
  11. After using overkill their are 815 block left. 813 rows in csv file. --edit There are two RFM-0601 and two MVS-0201
    1 point
×
×
  • Create New...