darn halo Posted 22 hours ago Posted 22 hours ago Hi, this is a semi-universal question. Is there any way to make my lisproutin run a regullas AC-command and extract info from it. Likewise can i insert my own info in the output? Example, i want my command to look like the output of massprop. But I also want it to write the unit afterwards so instead of it saying: "Volume: 3346204269.0" (Im based i mm) it says "Volume: 3.346204269 m³" Basically im looking for a shortcut to not have to recreate the entire command byt just read info from it and modify the output. I could see this come in hand for a lot of customization. Quote
Lee Mac Posted 20 hours ago Posted 20 hours ago No - you cannot intercept and modify the output of standard commands, only redefine them. Quote
BIGAL Posted 11 hours ago Posted 11 hours ago Using massprop in a lisp is easy you just write it to a file then read what you want out of that file and display. Just always write to a known file. Just a question would the answer not be Litre's. (defun c:vol ( / ent vol) (setq ent (car (entsel "\nPick a solid "))) (command "massprop" ent "" "Y" "D:\\acadtemp\\solid.mpr") (setq fo (open "D:\\acadtemp\\solid.mpr" "R")) (repeat 3 (setq vol (read-line fo)) ) (setq vol (read-line fo)) (close fo) (vl-file-delete "D:\\acadtemp\\solid.mpr") (alert (strcat vol)) (princ) ) 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.