Dynamic Blocks

Reply
Valued Contributor
jwscad
Posts: 58
Registered: ‎11-03-2009
Message 1 of 13 (451 Views)

Linking stretch action distance to attribute value

451 Views, 12 Replies
12-03-2012 10:57 AM

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

Active Contributor
jimbo2dajj
Posts: 38
Registered: ‎11-27-2012
Message 2 of 13 (442 Views)

Re: Linking stretch action distance to attribute value

12-03-2012 12:44 PM 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
Valued Contributor
jwscad
Posts: 58
Registered: ‎11-03-2009
Message 3 of 13 (436 Views)

Re: Linking stretch action distance to attribute value

12-03-2012 02:54 PM in reply to: jimbo2dajj

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

Active Contributor
jimbo2dajj
Posts: 38
Registered: ‎11-27-2012
Message 4 of 13 (422 Views)

Re: Linking stretch action distance to attribute value

12-04-2012 07:17 AM 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 :smileyfrustrated:

 

Let me know what you think,

 

B

Junior Civil Engineer using Civil 3D 2013
Active Contributor
jimbo2dajj
Posts: 38
Registered: ‎11-27-2012
Message 5 of 13 (421 Views)

Re: Linking stretch action distance to attribute value

12-04-2012 07:18 AM in reply to: jimbo2dajj

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

Junior Civil Engineer using Civil 3D 2013
*Expert Elite*
Charles_Shade
Posts: 8,196
Registered: ‎04-10-2005
Message 6 of 13 (411 Views)

Re: Linking stretch action distance to attribute value

12-04-2012 11:47 AM 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.

Regards, Charles Shade            Win8 FAQ
CSHADEDESIGN|AUTOCAD LT|LT-KB|DYNAMIC BLOCKS

 
Please mark Accept as Solution if your question is answered. Kudos gladly accepted.
Valued Contributor
jwscad
Posts: 58
Registered: ‎11-03-2009
Message 7 of 13 (408 Views)

Re: Linking stretch action distance to attribute value

12-04-2012 12:13 PM 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.

Valued Contributor
jwscad
Posts: 58
Registered: ‎11-03-2009
Message 8 of 13 (403 Views)

Re: Linking stretch action distance to attribute value

12-04-2012 12:29 PM 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

*Expert Elite*
Charles_Shade
Posts: 8,196
Registered: ‎04-10-2005
Message 9 of 13 (402 Views)

Re: Linking stretch action distance to attribute value

12-04-2012 12:36 PM 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)

Regards, Charles Shade            Win8 FAQ
CSHADEDESIGN|AUTOCAD LT|LT-KB|DYNAMIC BLOCKS

 
Please mark Accept as Solution if your question is answered. Kudos gladly accepted.
*Expert Elite*
Charles_Shade
Posts: 8,196
Registered: ‎04-10-2005
Message 10 of 13 (397 Views)

Re: Linking stretch action distance to attribute value

12-04-2012 01:25 PM in reply to: Charles_Shade

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).

Regards, Charles Shade            Win8 FAQ
CSHADEDESIGN|AUTOCAD LT|LT-KB|DYNAMIC BLOCKS

 
Please mark Accept as Solution if your question is answered. Kudos gladly accepted.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community