raj banerjee Posted June 25, 2015 Posted June 25, 2015 Hello lisp guru's I wonder if you can help, can anyone show how to create a lips routine which once invoked, askes to select a 3d object, once the oject is selected the routine then gathers the mass volume number, then does the following formula; (Mass figure/1000000000) x 2.5 which will then display it on the screen in a small box to be written down? It sounds simple but I havnt got a clue as ive not touched on lisp in over 15 years so ive forgotten everything. Any help would be most appreciated. Many thanks Raj Quote
ReMark Posted June 25, 2015 Posted June 25, 2015 Why couldn't you just use the "Write analysis to file?" option in the MASSPROP command and do the math yourself? Quote
raj banerjee Posted June 25, 2015 Author Posted June 25, 2015 was just trying to add a bit of automation to speed up the process. the info is going into a box on the tittle block you see Quote
raj banerjee Posted June 25, 2015 Author Posted June 25, 2015 would be nice if it would auto input the info into a text box which can be placed within the desired title block area, but that would be wishing lol Quote
BIGAL Posted June 26, 2015 Posted June 26, 2015 (edited) Like Remark when you do a Massprop the option is to write to a file, you then just reread that file and pull out the values you want and pick a point to write the answer or simpler use the centroid value. Did this years ago for concrete tilt panels using lisp. I just did it for someone so would have to start from scratch again. super simple use VL the volume is a variable. (defun c:mprop ( / obj vol cenpt) (setq obj (vlax-ename->vla-object(car(entsel "pick solid")))) (setq vol (rtos (vla-get-volume obj) 2 1)) (setq cenpt (vla-get-centroid obj)) (setq mspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (vla-addtext mspace vol cenpt 2.5) ) Edited June 26, 2015 by BIGAL Quote
raj banerjee Posted July 14, 2015 Author Posted July 14, 2015 Cheers a lot al will get that a go 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.