View Full Version : Separate cell for feet and inches in parameter
davidlee0821342849
2012-11-29, 09:46 PM
just as the post stated, I was wondering if there's a way to separate the feet and inches from the length of a parameter, so when I extract the data off an attribute it would be in its own cell (column). is this feasible?
clshade
2012-11-30, 12:32 PM
Only if these are two Attribs but then what would they have to do with the length of the object?
CAD will only recognize the length of the object when it is entered into the proper format.
davidlee0821342849
2012-11-30, 12:56 PM
my company uses a table lisp program that extract all this data into an excel format and it has to maintain this format in a nut shell. and we use this format for all the department to fabricated and ship out parts (which I found out they wont deviate from this format) I've try separating the attribute and have them pull the length parameter and have it suppress each but that only works if the values is zero. as far as I've read I haven't seen any thing so far on how to have them in there own column.
thanks again clshade! your the best
jyodak
2013-01-09, 05:57 PM
You obviously have code that retrieves the length of each of your fence sections. I assume that this value is in inches and is formatted to display feet and inches as shown.
If the length is in a variable called len in your Lisp code, then this will give you feet:
(fix (/ len 12))
and this will give you inches:
(- len (* (fix (/ len 12)) 12))
Or to simplify:
(setq feet (fix (/ len 12)))
(setq inches (- len (* feet 12)))
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.