I was curious:
Is there a way that i can put a Field in a block that does not have a locked down specific item to look for? What i'm trying to do is have a block that contains a field linked to an object (Polyline) and read its length. My problem is that when you put a field in a block you have to define what it is looking for so if i select "Object" in the field its asking for that object while i'm in the block editor, is there any way to have it pause for user input so that i can select the object after the block has been inserted?
Solved! Go to Solution.
If you can create the field first before you make the block, so it references the polyline. Then create your block including the field, it should work ok.
Otherwise you could use an attribute inside the block. And once you are back into the drawing you can edit the attribute and insert a field into it's value that points at your polyline. If you could be a bit more specific on how you need to use it, I could probably give you a better idea. Can you post a drawing with an example.
I dont know how to explain it better. We use travel distance blocks that read out how far a travel distance is (Polyline Length)
I use a block with an attribute in it now but that means i have to insert the block - Select the line to get distance - then enter distnace manuallu into attribute. That takes alot of time and if the length changes i have to manually change data
I cant put a field in a block and have it ask me to select the object. I have to use a text string and right click to insert field then select the object. I have attacjed a sample drawing but there really isnt much to it. the top one is an example of how i have a rectangle with a field string inside and the bottom block is an attributed block that has to be manually updated, i usually have between 5-10 travel distances in each drawing.
No. Fields do not support prompting, even fields in attributes.
You could create a custom command to do it but none exist in AutoCAD. AutoCAD Architecture implements the process built-in by using property sets and multi-view blocks in a process called tagging.
You could probably get some nice LISP writer on the customization group to do it free. Otherwise hiring someone to customize that would be relatively economical. I could do it but am trying to cut down on free-work. Try your local vendor.
thank you. Its not important enough for me to ask someone else to write up a script. I was just seeing if there was a way already in AutoCAD that i could do this. Again thank you
I'm afraid I can't help you any more than that, unless someone can give any hints for using a lisp routine, AFAIK you can not insert a block and get it to link to another object automaticaly. You have to do that by hand. You can use the attributed block but rather than adding the info by hand, when you double click on the block and open the attribute editor, go to the value and right click, this will let you add a field - select your object and it is now linked. You may need to do a regen but changes to the polyline will show up in the attribute, so you won't have to do it manually.
Thinking out loud, if you create a block linked to a very short polyline 1" for example (it will work with a point zero length, but that is hard to pick and anyway how accurate do you need to be), then when you need it, copy this short polyline and it's block to your distance polyline. Make sure the endpoints touch and are on the same plane then JOIN the two polylines (selecting the short one first) then regen to update the field.
In the attached drawing the top part has the short line positioned at the centre of the circle (zoom in to see it), and the middle part is after the JOIN command has been issued.
PS I'm on a roll here. The lower part is a block called Test, insert it at the end of your polyline explode it and join it. Job done. You could create a macro that will automatically insert and explode a named block and also issue the join command for you, so all you would need to do is a few clicks.
Sorry if I started rambling but the idea developed as I was writing the reply and I kept popping back to try it out.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.