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

Roof Slope Block with formula

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
Shaiki_
1939 Views, 14 Replies

Roof Slope Block with formula

I've made a pretty basic formula to pull the rise/run of any line (Y/X*12) and was wondering how I could implement this into a block where the formula filled out the rise field (as per the formula above) as a factor of a run of 12 (as is typical for roof slopes etc) just by associating the block with the line in question? Its quite a hassle to reassociate all the fields in the formula with the line, I'd like it to do it automatically by clicking the line.

 

Not sure if this would be better as a block or as a LISP.

 

14 REPLIES 14
Message 2 of 15
Libbya
in reply to: Shaiki_

Add a line to the block.  Add the dynamic actions parameters to move the line to align it with any roof slope.  Create your formula/fields referencing the line.  

Message 3 of 15
Shaiki_
in reply to: Libbya

Never ever has a more genius solution been presented. Thanks!

Message 4 of 15
Anonymous
in reply to: Shaiki_

Hi. Would you mine sharing your lsp file you are referring to? 

I am not too computer literate and struggling with this slope AND lsp thing. 

Thanks!

Message 5 of 15
Shaiki_
in reply to: Anonymous

Hi,

 

I'll attach the blocks I've made. One outputs as a slope %, and the other one as a Rise/12

Message 6 of 15
Anonymous
in reply to: Shaiki_

thank you!

Message 7 of 15
mcoquereau
in reply to: Shaiki_

Geez... I thought that stretching the block grip would update the slope text attribute, in both cases.

That was the thing I was looking for. Disappointed...

No attribute found in the blocks, or even in a new drawing after I imported both blocks. Perhaps, it is because I'm using Autocad LT? 

Message 8 of 15
chris
in reply to: mcoquereau

Not sure if the limits of LT affect the block. There are no attributes - simply a formula of the Rise over Run so that scaling the block doesn't ruin the result.

 

You have to regen (RE) after stretching the grips or making an edit for the text field to update. Or do nothing, and when you come back to it later it will be updated.

Message 9 of 15
mcoquereau
in reply to: chris

Regen did it! Many thanks, @chris for that lightning fast correct answer!

 

Sorry, not used to that old school software behavior (the regen thing)! Going back to Acad after years of Revit 😆

(Btw, be assured of my true preference of Acad vs Revit)

 

Now, I don't seem to be able to access the magic of the formula: no info via attribute manager or via any property. How the hell could I play with that thing? LT issue, just as parameters would be?

Message 10 of 15
chris
in reply to: mcoquereau

Once again, I'm not completely sure of whre LT limits things, but the block works off a field. If you right click the text note in the block, there should be an option to Edit Field. In here is where you 'll be able to find the formulas.

Message 11 of 15
mcoquereau
in reply to: Shaiki_

Got it.

What annoys me is that the formula doesn't refer to any specific parameter, even when right-clicking on the greyed out elements of the Formula, see below.

Feel free to escape my noobiness by referring me to good tutorials!

mcoquereau_0-1625024767420.png

 

Message 12 of 15
Shaiki_
in reply to: mcoquereau

It is referring to the length of the lines making the slope triangle symbol. Play around with the field dialogue box a bit, there is a button to pull information from objects in your model. This block is my pride and joy, if it was simple and easy, they would be everywhere 🙂

Message 13 of 15
mcoquereau
in reply to: Shaiki_

I right-click on the grey-out fields in the formula box (already in "field editor mode"), no sign of reference to any parameter, no "possibilities promising button" either, see below.
Thus, I don't know how to create such a complex device by my own.

mcoquereau_0-1625026158436.png

 

Message 14 of 15
Shaiki_
in reply to: mcoquereau

Yes, its right there in your screenshot! THe little target button to the right of Object Type (Line) is how you select something from your model. In this case a Line was selected, and it is referencing the length of it (as per the list below). You can use a similar method to get areas of polygons or any other parameter that is available to use in formulas, or simply to convert the data into text fields.

Message 15 of 15
mcoquereau
in reply to: Shaiki_

Found how fields can be inserted pretty much anywhere! My block similar to yours, works just fine now.

@Shaiki_ , @chris , big cheers to you, I'm now on the verge of a new drafting era!

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

Post to forums  

Autodesk Customer Advisory Groups


”Boost