Calculate row total, linear and non-linear components

Calculate row total, linear and non-linear components

marieHPAJL
Enthusiast Enthusiast
3,199 Views
23 Replies
Message 1 of 24

Calculate row total, linear and non-linear components

marieHPAJL
Enthusiast
Enthusiast

I am a lighting designer new to Revit and I would like to make informative schedules showing the cost of the luminaires.

 

So far so good.

 

The problem is that linear lighting  is priced in running meters. When I add linear lighting in a kitchen for instance, I add one piece on linear lighting  (thus counted as 1 in the schedule), but it might be 3m long and the price will be 3 x cost/m. In the same time I will add some other lighting that is non-linear and is priced pr piece.

 

 

So this is the situation:

 

marieHPAJL_0-1608047580494.png

I would like to do something like the following, but dont know what kind of formula I should use:

 
 

marieHPAJL_0-1608048194499.png

The thing is to get the prices for both linear and non-linear lighting in the same column.

Any tips?

0 Likes
Accepted solutions (3)
3,200 Views
23 Replies
Replies (23)
Message 2 of 24

martijn_pater
Advisor
Advisor
Accepted solution

I think you could use a yes/no parameter to define linear/non-linear, or a calculated lenght value. Needs a value otherwise when it doesn't have a lenght your if statement will not work. You could also have the cost calculated within the famil(y)(ies) as shared parameter to schedule directly.

 

In any case you need another parameter there...

0 Likes
Message 3 of 24

barthbradley
Consultant
Consultant
Accepted solution

Like this:

 

Lighting Costs 2.jpgLight Costs.jpg

0 Likes
Message 4 of 24

marieHPAJL
Enthusiast
Enthusiast

Hi, Martjin!

 

Oh, I just love parameters:)  Well, I guess I do. Have to learn some more about them though...

 

0 Likes
Message 5 of 24

marieHPAJL
Enthusiast
Enthusiast

Hi, Barth. Thank you for helping me out again - I will make myself a very simple sample family and try this out...

0 Likes
Message 6 of 24

ToanDN
Consultant
Consultant
Use this formula for Calculated Cost:
if (Length >0, (Length / 1m) * [Cost per meter], Cost)

- Cost, Cost per meter, and Calculated Cost are Number parameter for simplicity.
- Nonlinear fixtures should not have Length value, or = 0.
Message 7 of 24

barthbradley
Consultant
Consultant

I tried that. Doesn't work if the Family doesn't have the "Light Length" parameter.  

 

Isn't this what you are prescribing?:

 

CostT.jpg

 

 

 

0 Likes
Message 8 of 24

martijn_pater
Advisor
Advisor

Perhaps try to make a kind of "Light Lenght+0" calculated value to give all of those a value? Then test that for the condition with your IF statement, not sure if that works...

0 Likes
Message 9 of 24

barthbradley
Consultant
Consultant

I'm done playing with it.   A Calculated Parameter using a conditional statement to evaluate a Yes/No Project Parameter is the way to go.  

Message 10 of 24

marieHPAJL
Enthusiast
Enthusiast

This worked great!

marieHPAJL_0-1608063926615.png

Thanks very much to the two of you. 

 

I still have one question though - do you think it is possible to "not itemize" and still end up with the right total price?

 

Now this happens:

 

marieHPAJL_1-1608064107158.png

 I

0 Likes
Message 11 of 24

barthbradley
Consultant
Consultant

How are you sorting? Don't sort.  

0 Likes
Message 12 of 24

barthbradley
Consultant
Consultant

How come you don't have checkboxes in all the rows?  Is this a Multi-Category Schedule? Did you not mark some Categories for the Yes/No Project Parameter?  

0 Likes
Message 13 of 24

marieHPAJL
Enthusiast
Enthusiast

That is my fault. I didn't assign the parameter in question to the ones that ended up without a checkbox!

0 Likes
Message 14 of 24

martijn_pater
Advisor
Advisor

@martijn_pater wrote:

Perhaps try to make a kind of "Light Lenght+0" calculated value to give all of those a value? Then test that for the condition with your IF statement, not sure if that works...


FYI it doesn't. There doesn't really seem to be any method to do a kind of "has a value" checking other then adding a yes/no parameter for the type (or similar), as mentioned.

You could only split the schedule filtering for "has a value", one with one without but I suppose... except that would probably make it difficult to do totals...

 

related topic: https://forums.autodesk.com/t5/revit-architecture-forum/scheduling-cant-evaluate-a-null-nil-field/td...
(with some links to idea forum posts)

Message 15 of 24

ToanDN
Consultant
Consultant

here is an example without adding a Yes/no.

 

ToanDN_0-1608139843451.png

 

Message 16 of 24

ToanDN
Consultant
Consultant

.. Grouped and subtotaled per Type

 

ToanDN_0-1608141680463.png

 

Message 17 of 24

barthbradley
Consultant
Consultant

seems to me that the OP should buy us all a round of Solution Credits. 

 

Just saying...

 

😉 

Message 18 of 24

barthbradley
Consultant
Consultant

I appreciate the "Like" @marieHPAJL, but I was more thinking we all deserved on of these tasty 'lil intoxications: 

 

Solution Credit.jpg

 

...maybe even with a garnish and tiny umbrella in them.  

 

Bottoms Up! 

 

 

0 Likes
Message 19 of 24

martijn_pater
Advisor
Advisor

Well I think post #9 summarizes it...

0 Likes
Message 20 of 24

barthbradley
Consultant
Consultant

I appreciate that @martijn_pater, but I think we all shined on this one. No winners or losers. It was a team effort all the way. Even, @marieHPAJL contributed to the success.  Without Marie, it wouldn't have been possible.  

 

😉