comcu Posted August 30, 2008 Posted August 30, 2008 Hi, I am trying to create a vba project that will let me automate the calculation of glass sizes within a grid. I currently perform this task manually using a dynamic block The dynamic block has 4 attributtes with fields and 2No rectangles(broken into 8 lines. A scale action and a XY parameter. I use the scale action to change the size of the attributes and the xy parameter to allow me to stretch the block. The attributes are 1. Spec – user inputs 2. Ref – user input 3. Width - calculated from the dynamic block 4. Height - - calculated from the dynamic block The width and height attributes are fields linked to the outer hidden rectangle which is offset 14mm from the visible inner rectangle. I stretch the visible rectangle the size of the bay in each grid. what I would like to happen is that I run the project click a point and as long as the point is enclosed within a rectangle my dynamic block is inserted and rather than me manually moving the grips so the block is made the size of the closed rectangle (window bay) the dynamic block is stretched the size of the window bay programmatically the problem with this is I don’t think vba works with dynamic block? I then thought I could do the same with a normal block and then I could manipulate the block via vba however when the acadblock is scaled in size and so would the attributes. This would mean non conforming text sizes depending on the bay sizes and also the glass size is calculated from the 14mm offset. If the block was scaled on insertion then the 14mm could change to anything? I though about doing away with the offset line and calculating it with vba just before insert eg glass height = block height + 28# however when I have to perhaps change the size of the screen I would have to delete the block and start again? I then thought about calculating it within the field but object length and calculation are in different sections of the field window and it seems like you can not use them together? The spec and ref could be automated thru vba with a form Ref = curtain walling ref.value + number + 1 And spec could be typed into a text box on the form before the select point. I know how to do this and also the pick point insert block etc but the rest I have mentioned above I no idea!! I would appreciate any helpful comments, Cheers, col 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.