Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linking stretch action distance to attribute value

13 REPLIES 13
Reply
Message 1 of 14
jwscad
3979 Views, 13 Replies

Linking stretch action distance to attribute value

Is it possible. I have searched and havent had much luck.

 

I have a block which is a simple rectangle with a height and width attributes that when I edit, change or update the height and width attributes I want the rectangles height and width to change as well.

 

I know I can go backwardsusing fields and the attributes would show the stretched length and width but is it possible to go the other way? Thanks

 

John

13 REPLIES 13
Message 2 of 14
jimbo2dajj
in reply to: jwscad

Hey John,

 

I've already seen a bloc somewhat capable of this but haven't had the time to look into it further. Have you found anything since you made your post?

 

Bryan

Junior Civil Engineer using Civil 3D 2013
Message 3 of 14
jwscad
in reply to: jimbo2dajj

Nothing yet. Can you share that block that you are speaking of? Thanks

Message 4 of 14
jimbo2dajj
in reply to: jwscad

Here's one that we're currently working on. It's a **** cross-section that can practicaly build itself once the values are entered in the properties palette.

 

This is a work in progress and like has many glitches since we have yet to fully test and master the technique.

 

It was used with a Block Properties Table and many Parameter Sets.

 

Again, still learning how to use this so my knowledge about these commands is limited :S

 

Let me know what you think,

 

B

Junior Civil Engineer using Civil 3D 2013
Message 5 of 14
jimbo2dajj
in reply to: jimbo2dajj

Lolll its a d-y-k-e cross-section

Junior Civil Engineer using Civil 3D 2013
Message 6 of 14
Charles_Shade
in reply to: jimbo2dajj

You can make the dimension changes to the Values of the Parameters with the Properties window and not have to do anything more than that.

Bascially you are changing the Properties of the Block with direct input.

Message 7 of 14
jwscad
in reply to: Charles_Shade

Good point. It would work as I have described it but once again I have not provided all of the information...

 

I work in the solar industry and everyday I am placing rectangles, which represent solar panels, on roofs of buildings. The dimensions of the rectangles are known. What is not known is the dimensions of the rectangles on sloped roofs as seen in plan view. So, what I end up doing is taking the length of the solar panel rotating it to match the sloped roof and re-drawing the squashed rectangle to be an accurate view of the panel in plan view.

 

What I was hoping to be able to do is to include a trig formula in the dynamic block which takes the length value and the roof slope and re-calculates what the horizontal length would be in plan view. See attached drawing. It's still a work in progress.

Message 8 of 14
jwscad
in reply to: jwscad

In the attachment, the block called "dynaModule", has a few attributes. The ones that are important are the length, width and tilt. The length and width attributes currently reference the dimensions of the rectangle.

 

Basically this should go in reverse, with the dimensions of the rectangle referencing the length and width attributes. Somewhere in the operation I would place the bit of trig which would include the tilt attribute.

 

The formula to include would be : true length x (cos of tilt) = plan view length

Units would be degrees not radians

Message 9 of 14
Charles_Shade
in reply to: jwscad

Let me see if I can write myself thru this:

1. Create an Attrib that is the Slope. Default it to whatever (1-12)

2. Edit the Field you have for the Length Attrib, choose Objects, then Formula

3. In the Formula area right click and choose Insert Field (nice one, eh?)

4. Choose Object and then choose the Slope Attrib.

5. Grab the Value from the Property column and hit OK. (The number of the Slope default should be in Formula area now)

6. Write your formula with that Value in it and this should drive your Length on Slope.

 

(I hope)

Message 10 of 14

Too late to edit previous comment:

I did not see that Tilt Attrib you have in there. That would be the one to choose for the formula.

 

Get that done and we may be able to get the Orientation to be driven by the rotation assuming Portrait or Landscape(Ledger).

Message 11 of 14
jwscad
in reply to: Charles_Shade

I think you have the right idea but I need it to work in reverse. The attribute values need to drive the length and width values. I think you would still use stretch parameters but grips wouldn't even be necessary. Not sure how this would work or even if it's possible.

Message 12 of 14
Charles_Shade
in reply to: jwscad

It seems like we are on the same page but reading from opposite ends.

 

If you know the given length of the panel then if this remains constant in the formula then when the slope factor (radian) is applied (presumambly something less than one) the overall length would then be correct in plan for the given slope.

Message 13 of 14
jwscad
in reply to: Charles_Shade

The reason I am interested in a dynamic block is because we work with hundreds of different module sizes on a day to day bases. At the minimum I want to:

 

1. Double click my block

2. fill out the length, width and tilt attributes

3. Have the size of the rectangle adjust based on these inputs.

 

Thanks for the help.

Message 14 of 14
martinKTJ5W
in reply to: jwscad

Did you ever manage to achieve this?  I'm trying to do the same thing!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services