PDA

View Full Version : fields in block attributes



chulse
31st Jan 2008, 12:51 pm
Is it possible to use fields as block attributes? For example, could I calculate attribute A from the value assigned to attribute B?

Then..., could the calculated attribute be passed to a distance parameter in a dynamic block?

Thanks

dbroada
31st Jan 2008, 01:43 pm
me again - Yes an NO :D

I think it all works from the block as you insert it. I'll try to attach one of my terminal blocks. If you insert it (DON'T type anything in the dialogue box as you will break the link to the field) and stretch it AND regen you will see the number of terminals increase. The number of terminals is determined by the DISTANCE variable divided by the terminal width. If I post the correct one there is also a metric/imperial factor built in. The block knows the terminal width but gets the distance from the block parameter. What I can't do is feed this back the other way.

(Is that what you are asking?)

chulse
31st Jan 2008, 02:04 pm
me again - Yes an NO :D

I think it all works from the block as you insert it. I'll try to attach one of my terminal blocks. If you insert it (DON'T type anything in the dialogue box as you will break the link to the field) and stretch it AND regen you will see the number of terminals increase. The number of terminals is determined by the DISTANCE variable divided by the terminal width. If I post the correct one there is also a metric/imperial factor built in. The block knows the terminal width but gets the distance from the block parameter. What I can't do is feed this back the other way.

(Is that what you are asking?)

Dave,

I don't see how you made the Attribute into a field?

In VBA would it be possible to populate an attribue from a dialog box? (yes I'm still brainstorming on improving the tree block tool)

And THANKS again for all the help on it, it's already saved me loads of time.:wink:

dbroada
31st Jan 2008, 02:26 pm
If you open the terminal group drawing with BEDIT you will see that NUMBER_OFF (on defpoints) is an attribute. Double Click this and right click in the Default field. Insert Field is one of the options. Double click this and you get to the field definition area. I think I start with a formula but if you now double click the Distance field you find where you can select Objects. I'm doing all this with one hand as I am at lunch at the moment - and I built those blocks too along ago to remember all the steps I took. Dimantle it at your leisure and ask again.

And yes, it is possible to populate an attribute from a dialog box not far removed from where we were with the trees earlier this year. :D I hope you are spending all that time you have saved wisely! Wouldn't it be nice to say "I can now do 4 weeks work in 3 - give me more holiday (vacation)". As it is I'm spending nearly all this year's allowance in one go to come to the States in September.

chulse
31st Jan 2008, 02:45 pm
If you open the terminal group drawing with BEDIT you will see that NUMBER_OFF (on defpoints) is an attribute. Double Click this and right click in the Default field. Insert Field is one of the options. Double click this and you get to the field definition area. I think I start with a formula but if you now double click the Distance field you find where you can select Objects. I'm doing all this with one hand as I am at lunch at the moment - and I built those blocks too along ago to remember all the steps I took. Dimantle it at your leisure and ask again.

And yes, it is possible to populate an attribute from a dialog box not far removed from where we were with the trees earlier this year. :D I hope you are spending all that time you have saved wisely! Wouldn't it be nice to say "I can now do 4 weeks work in 3 - give me more holiday (vacation)". As it is I'm spending nearly all this year's allowance in one go to come to the States in September.

Ok, I see how you did it now. I'll work on the VBA part next. I'd like to enter the tree diameter as an attribute and have it calculate the CRZ. Also, the CRZ calculation can vary based on local regs, so I'm thinking I'll add a "CRZ Factor" field to use in the calcs...

Are you going to be anywhere near Washington DC/Northern Virginia? Stop by!

dbroada
31st Jan 2008, 03:07 pm
Are you going to be anywhere near Washington DC/Northern Virginia? Stop by!My geographic knowledge of the USA is at the same level that we think Americans have of world geography. I have never been west of Portugal (I flew east when I went to the antipodies) and have no idea of where anything is. We are aiming for New York for a few days and will then be "leaf peepers" in New England for the remaining 2 weeks so looking at this kiddies globe on my boss's desk, no, we are not going to Washington DC/N Virginia.

chulse
31st Jan 2008, 03:26 pm
That's a good time of year to be in New England, enjoy it!

BIGAL
5th Feb 2008, 03:23 am
Updating a block attribute is fairly easy, only tricky bit is you must be able to identify the one block to be updated as you have multiple blocks with the same name. There is good examples here of how to search dwg and make block list.

Your talking trees we talk drainage pits all with unique ID label so can pick pit label of screen but update a seperate schedule list. It appears to work even if working model but schedule is in a layout tab.

In our case attribute 0 has label (not 1 in vba) its then a case of attrib.update(4) ie 5th attribute in list

eg Pit1 3000.335 4876.455 900 600 300 102.65 102.60 (8 attributes)

chulse
5th Feb 2008, 10:30 am
Alright, I'm a bit confused...
So how do you know the order of them?

But is it possible to pass an attribute to a dynamic (distance) parameter on block insertion?

BIGAL
6th Feb 2008, 03:05 am
Double click an attribute and the edit box should appear and the atrributes are in order of creation 0-

Sokratus
24th Feb 2008, 07:20 pm
Hi Dave,

I use yuor block TerminalGroup-SAKR, insert into my drawing,(I don't type anything) but number of terminals don't increase. And Regen command don't help!

Spass

dbroada
24th Feb 2008, 07:41 pm
If you insert the block at 1:1 and don't type anything in the number field it should work. You need to pull the blue arrow to increase the number of terminals and then regen. How many terminals are showing and what number is being shown?

Sokratus
24th Feb 2008, 07:52 pm
6 Terminals, but NUMBER_OFF is 1!
I use AutoCAD 2008 sp1!

Sokratus
24th Feb 2008, 08:30 pm
It's work, sorry!