samifox Posted May 25, 2017 Share Posted May 25, 2017 hi im working with fields connected to objects for area calculations, each time i need a new field i have to do the same initial operation over and over (Field > Object >Select>Additional Formatting etc) i want to set a predefined field so all i need to do is the select the object which i want to link to. how can i do it? Thanks S Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 25, 2017 Share Posted May 25, 2017 Have you checked out LeeMac? If not, why not? http://www.lee-mac.com/areastofield.html Thanks Lee! Quote Link to comment Share on other sites More sharing options...
samifox Posted May 25, 2017 Author Share Posted May 25, 2017 hi im working with fields connected to objects for area calculations, each time i need a new field i have to do the same initial operation over and over (Field > Object >Select>Additional Formatting etc) i want to set a predefined field so all i need to do is the select the object which i want to link to. how can i do it? Thanks S yaa im a big fan of LEE, but it seems like i miss that one Thanks Quote Link to comment Share on other sites More sharing options...
tombu Posted May 26, 2017 Share Posted May 26, 2017 I modified his code a bit to add macros for labeling in my CUI. Length, square feet, square yards, and acreage. Out of respect I wouldn't post it without his permission. A respectable amount of my code was downloaded from http://www.lee-mac.com/ Quote Link to comment Share on other sites More sharing options...
samifox Posted May 30, 2017 Author Share Posted May 30, 2017 hi i never been a math genius but autocad got confused here (or me) 290.10+3.84=293.94 (sorry for the mistake in the attached image) but the preview shows 674.58 ? Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 30, 2017 Share Posted May 30, 2017 The 3.84 is for some reason being read as 384, and that is being added to 290.1. I haven't delved into the field expression, but am guessing that the units format in your field may be the problem. Do you have any Additional Formatting specified? Quote Link to comment Share on other sites More sharing options...
samifox Posted May 30, 2017 Author Share Posted May 30, 2017 no. ive attached a sample dwg field-prob.dwg im the sample i\ve set the point to read 290.10 , ive offset it 50 units up, i expect it to now read 290.60 Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 30, 2017 Share Posted May 30, 2017 no. ive attached a sample dwg [ATTACH]61379[/ATTACH] im the sample i\ve set the point to read 290.10 , ive offset it 50 units up, i expect it to now read 290.60 If you subtract 290.1 from 290.6, you will see that the difference is 0.5 mms, not 50mms, doesn't seem very surprising to me? Quote Link to comment Share on other sites More sharing options...
steven-g Posted May 30, 2017 Share Posted May 30, 2017 If the units you are working in is centimeters, you can't input a measurement in meters into a formula and expect Autocad to work it out, you will need to add some additional math in the formula to make the units the same type. field-prob.dwg Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 30, 2017 Share Posted May 30, 2017 (edited) The drawing units are mms, and yes, I agree steven-g, glad you spoke up, as per my conjecture in the first response. On Lee's website, in his description of the capabilities of the lisp, he describes the steps needed to define or alter field units, in conjunction with the lisp to which I linked in my earlier post. Edited May 30, 2017 by Dadgad Quote Link to comment Share on other sites More sharing options...
steven-g Posted May 30, 2017 Share Posted May 30, 2017 Dadgad It would be helpfull to see the file, that had the "wrong" answer shown in post #5 it certainly looks like an addition format problem. Quote Link to comment Share on other sites More sharing options...
samifox Posted May 30, 2017 Author Share Posted May 30, 2017 Thank you guys Quote Link to comment Share on other sites More sharing options...
samifox Posted May 30, 2017 Author Share Posted May 30, 2017 o....by the way can i set different bg color to the field? Quote Link to comment Share on other sites More sharing options...
steven-g Posted May 30, 2017 Share Posted May 30, 2017 Nope, you can turn it off fielddisplay=0 and if you use mtext to create the field you can set a background color in mtext Quote Link to comment Share on other sites More sharing options...
samifox Posted May 31, 2017 Author Share Posted May 31, 2017 Thanks. i want to apply a mask to all fields, and when its time to plot i want to remove masks. how can i filter in fields? Quote Link to comment Share on other sites More sharing options...
samifox Posted May 31, 2017 Author Share Posted May 31, 2017 actually i play around with that thinking about the easiest way to unique the fields with a style, i actually find that the MLeader style can be used, in the style definition just set the leader type to none, in the Content insert a field, and set the Frame Text option on, when its time to plot you just need to uncheck it still interested to get your thought and methods Thanks S Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 31, 2017 Share Posted May 31, 2017 Nope, you can turn it off fielddisplay=0 and if you use mtext to create the field you can set a background color in mtext Nicely answered Steven, and spot on. I don't have the file referenced in post #5, but right again, which as students of history, we have all come to expect from you! Quote Link to comment Share on other sites More sharing options...
samifox Posted June 1, 2017 Author Share Posted June 1, 2017 hi. is there a trick to regenerate field upon move? Quote Link to comment Share on other sites More sharing options...
samifox Posted June 1, 2017 Author Share Posted June 1, 2017 hi i want my field to display its own Y value, setting the same procedure >insert > field>object>select) wont let me to select itself why? Quote Link to comment Share on other sites More sharing options...
tombu Posted June 1, 2017 Share Posted June 1, 2017 What type of object is it? Quote Link to comment Share on other sites More sharing options...
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.