stlo Posted November 15, 2024 Posted November 15, 2024 Hi everyone! I was wondering if something similar happened to someone here? I have a Lisp routine that is not working in Intellicad 13.0 PE. (It was working in Intellicad 11.1 PE version? Maybe it's in the code but I doubt it because it has been done by the legendary Lee Mac in 2011! All other lisp work well. Here's the code if anybody can tell me if there's something wrong! This routine is calculating the square footage by clicking on 2 dimensions, after that, it asks to click exactly where you want the result to be shown. My problem right now is at the clicking part! It let me select the 1st and the 2nd dimension and it stops, I can't insert the result! Thanks in advance for your help! Have a good day! (defun c:aaa ( / dm1 dm2 en1 en2 obj get hgt ins ) (and (setq dm1 (car (entsel "\nSelect 1st dimlineaer :"))) (or (member '(100 . "AcDbAlignedDimension") (setq en1 (entget dm1))) (alert "Invalid object.<!>") ) (setq dm2 (car (entsel "\nSelect 2nd dimlineaer :"))) (or (member '(100 . "AcDbAlignedDimension") (setq en2 (entget dm2))) (alert "Invalid object.<!>") ) (setq obj (tblobjname "BLOCK" (cdr (assoc 2 en1)))) (while (and (not hgt) (setq obj (entnext obj))) (and (= (cdr (assoc 0 (setq get (entget obj)))) "MTEXT") (setq hgt (assoc 40 get)) ) ) (setq ins (getpoint "\nSpecify location of text area :")) (entmake (list '(0 . "TEXT") (cons 10 (trans ins 0 1)) (cons 11 (trans ins 0 1)) hgt (cons 1 (strcat (rtos (LM:roundup(/ (* (cdr (assoc 42 en1)) (cdr (assoc 42 en2))) 144) 0.1) 2) " SQF")) ) ) ) (princ) ) Quote
BIGAL Posted November 15, 2024 Posted November 15, 2024 A maybe (LM:roundup where is it ? Or have you preloaded Lee's code. Also good practice is have a space (LM:roundup (, sometimes when no space it looks like a defun name so does not exist. 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.