Jump to content

Recommended Posts

Posted

Hi!

I'm working for a civil engineering firm, with about a year's worth of real-world CADD experience. I'm familiar with the block editor and with creating and using dynamic blocks, but I'm envisioning a block to help us set up our plan and profile sheets and I'm not quite sure how to go about creating it. This block would be made up entirely of text attributes and it would be built to line up with the profile grid. Horizontally, there would be stations and vertically there would be elevations at preset intervals. I'm wondering if there's a way to dynamically link these attributes so that when the block is inserted, you would just have type in the beginning station (say, 1+00) and the beginning elevation (say 885) and it would fill in the rest for you. I know this could be done with a LISP routine, but I would rather have a block that could just be inserted into each sheet as necessary.

 

Is this at all possible? Does anyone have experience creating something similar to this?

Posted

Uhhh... What you COULD do is draw out the block before hand, then use the create block command, select everything you want in it, and then put the text attributes where needed. When you open it to start and you need to move an elevation you can use the "REFEDIT" command to move things around to where you need.

Posted

Thanks for the suggestion, Tuns.

 

I suppose that could work, but I don't think it will have exactly the effect I'm looking for. I want to create a "smart" block, if you will, that will count off the station/elevations for me. So, if I tell it that the 'datum' attribute is at Sta. 1+00 with an elevation of 885, it will fill in the rest of the attributes so that the next station will be Sta. 2+00 and the next elevation will be 890, and so on. I want something to replace copying and editing text entities. Again, I'm not 100% sure that this is even possible, but I figured I would see if anyone had any ideas.

Posted

It sounds possible and if what I'm thinking of works I could do it but it would take me about a week or so to get everything figured out... I'd be using macro's of course since I'm on LT. I know its possible with LISP as well but I don't know how to program with LISP. It may be impossible with a macro so I might not be able to help at all.

Posted

Well, if it would be that much trouble, I wouldn't worry about it. I just figured maybe there was a way to link the attributes together using fields, and format the data so that each attribute would 'count' upwards from whatever base number you gave it. But I can't seem to find any options like that in the attribute definition dialogue box.

Posted

Could a mod move this to the LISP forum so he might be able to find help? One of the technical geniuses that live in that forum will be able to help. :) ie: Lee Mac, Black Box, and Commando Bill.

Posted

It could be done with just fields in the attributes value, a field will allow you to build up a simple formula, for example the second station would read the value of the attribute for the first station and add 1 to that value, the third station would add 2 etc, so it doesn't matter what the first value is the following attributes would just add to it, you could even add in a constant value so instead of adding 1 each time you could tell it to add 5. If you don't get any suitable answers, I'll put an example together tomorrow.

Posted

Thanks! That sounds like exactly what I was looking to do. I'd appreciate that.

Posted
It could be done with just fields in the attributes value, a field will allow you to build up a simple formula, for example the second station would read the value of the attribute for the first station and add 1 to that value, the third station would add 2 etc, so it doesn't matter what the first value is the following attributes would just add to it, you could even add in a constant value so instead of adding 1 each time you could tell it to add 5. If you don't get any suitable answers, I'll put an example together tomorrow.
If it can be done this way, then it would be slicker than LISP and useful for the other LT folks as well. So, IMO it's worth posting your example in any case.
Posted
Thanks! That sounds like exactly what I was looking to do. I'd appreciate that.

OK this is just a quick example, I have to be honest I haven't got a clue about how you would like the layout to be, so all I have done is tried to show how you can use the fields in an attribute to increment the values, but also how you can choose the increment.

When you insert the block called "Station" it will prompt you for the starting station number and the increment value. Once the block is inserted select the block and you will see a visibility grip (down arrow) click on this and choose "ON" hit escape or clear the selection however you do that and do a 'regen' to change the values go back to the "OFF" visibility state and then edit the values of the starting station.

 

OK long description, just play with it a bit. If this is anywhere close to what you are hoping to achieve either adapt it, or if you would like to post a small example of the sort of layout you work with, I could change this to suit. If this does what you expect then give a shout and I'll give the long winded explanation about how and why.

 

PS this isn't particularly an LT solution it should work anywhere.

Station.dwg

Posted
If it can be done this way, then it would be slicker than LISP and useful for the other LT folks as well. So, IMO it's worth posting your example in any case.

 

It can definitely be done the way steven-g described.

Posted

I didn't even know this. I'm still really new to using blocks. :oops:

Posted

Hey Tuns,

When in the attribute definition dialog box pic on the field button to the right of the default text box.

 

field entry pic1.jpg

 

then pick on the pulldown listbox and select the "Other" category

 

field entry pic2.jpg

 

pick on the dieselexpression field name and then create your expression in the text box to the right and then hit okay and finish filling out your information for the attribute

 

field entry pic3.jpg

Posted

Oh, thanks man. The people I work with haven't ever used blocks with attributes so I took it upon myself to make some for us... So I'm not the most knowledgeable when it comes to blocks. :(

Posted (edited)

I have attached an attributed block to do the station and elevation. and it will be driven by a macro. below is the macro that you need to put into a command button

*^c^cattdia;0;_.insert;station2;\;1;\;;setvar;userr1;$m=$(+,$(getvar,userr1),$(getvar,userr2));setvar;userr3;$m=$(+,$(getvar,userr3),$(getvar,userr4));

before you run the command go through and set up userr1 as your starting station number, and userr2 will be the number that will increment the station number; and then userr3 will be your elevation, and userr4 is going to be the number that your elevation will be incremented by with each placement.

when you run the command it will continue placing the block until you hit escape, and as long as you don't get out of the drawing once you set the userr variables you won't have to touch them again.

**ignore the station1.dwg...that was the wrong attachment. the station2 is the correct one***

station2.dwg

station1.dwg

Edited by Matsui21
attached file station1 is incorrect
  • 2 weeks later...
Posted

Sorry to bump this back up, but I figured it out. I've attached my example, for anyone interested.

 

It occured to me that it didn't really need to be done with attributes, it could just be done with a regular field. The block is just saved as a dwg, then all you have to do is use the browse option under the insert command and pick the drawing and insert it. Once it's inserted, use the block edit command to edit the datum stations and elevations (which, btw, are actually single-cell tables since this allowed for the use of formulas in the fields).

Profile Grid Block_Test.dwg

Posted

Looks good, it makes more sense now I can see an example.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...