Grigs Posted April 7, 2010 Posted April 7, 2010 I would like to create a block that gets the square footage of a closed polyline. I believe you use a mtext field. Does anyone have a block like this? Quote
Lee Mac Posted April 7, 2010 Posted April 7, 2010 You could put the Field in an attribute of a standard block Quote
Grigs Posted April 7, 2010 Author Posted April 7, 2010 Right, but how do you line the field to a polyline? And which field would you use? Quote
Lee Mac Posted April 7, 2010 Posted April 7, 2010 Type FIELD at the command line, choose Object, select your Polyline and you will see the Area property. Else, I wrote a LISP for this a while back: http://www.cadtutor.net/forum/showthread.php?t=46420 Quote
Grigs Posted April 7, 2010 Author Posted April 7, 2010 is there anyway to link a polyline to a block that has the field in it afterwards? Like have a block made, draw a polyline, insert the block and assign that block to a specific polygon? Quote
alanjt Posted April 7, 2010 Posted April 7, 2010 In the MText, Text or Attribute editor, you can insert a Field that references any type of object (just right-click in the editor). It's just up to you what values you want extracted. Quote
Lee Mac Posted April 7, 2010 Posted April 7, 2010 Yes, you can copy/paste the Field code into the attribute, or use the LISP I linked you to. Quote
alanjt Posted April 7, 2010 Posted April 7, 2010 Yes, you can copy/paste the Field code into the attribute, or use the LISP I linked you to. Teach to fish first. Quote
Lee Mac Posted April 7, 2010 Posted April 7, 2010 Teach to fish first. Of course, just offering all options Quote
alanjt Posted April 7, 2010 Posted April 7, 2010 Of course, just offering all options I know, but you're a little to quick on the draw to give them a program to do it for them.:wink: In all fairness, the thread is in the Lisp section. Quote
Grigs Posted April 7, 2010 Author Posted April 7, 2010 Thanks. I was able to create a field that extracted the area from a closed polyline. My issue is that I want to create a block that contains the object|area field, but my confusion is linking it to an editable polyline. If you include the polyline in the block, you can't change the size. Quote
Lee Mac Posted April 7, 2010 Posted April 7, 2010 Perhaps use an attributed block and copy/paste the relevant field code into that attribute. Else I'm not sure if Dynamic blocks have that capability... Quote
Grigs Posted April 7, 2010 Author Posted April 7, 2010 Ok!! The light came on!! I created an attrubuted block that had the field in it. I then inserted it into a drawing a drew a closed polyline. When I went into the eattedit command, I double-clicked on the 'value' and it allowed me to pick a specific polyline. Thanks Quote
Lee Mac Posted April 7, 2010 Posted April 7, 2010 You kinda did the reverse of what I suggested, but whatever works for you Quote
Grigs Posted April 7, 2010 Author Posted April 7, 2010 Been accused of doing things bass-ackwards before ) Quote
alanjt Posted April 7, 2010 Posted April 7, 2010 Been accused of doing things bass-ackwards before ) Unless I read your procedure incorrectly, without the aid of code, I would have done it the same way. Quote
Lee Mac Posted April 7, 2010 Posted April 7, 2010 Unless I read your procedure incorrectly, without the aid of code, I would have done it the same way. I would have inserted the block, then copied the field code into the attribute - perhaps I'm the backwards one Quote
alanjt Posted April 7, 2010 Posted April 7, 2010 I would have inserted the block, then copied the field code into the attribute - perhaps I'm the backwards one If the the attributed block was specific to that purpose, I would, when creating the block, go ahead and field reference a PLine. When I insert the block, the default value will be nil, but when I edit the attribute and edit the field, it will jump straight to the PLine area field and all I have to do is select a new PLine. Just saves a few steps. I did the same thing in our titleblock for the viewport scale. 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.