Material List Structural Member Reporting Method and Its Affect on Pricing


Recommended Posts

In X12 I've noticed that when using Structural Member Reporting in a material list, the price column in the list does not appear to be sensitive to whether a "per unit" or "per length" calculation is being performed by the material list.  In both cases, the material list appears to use the same Price variable in the Component Panel of each object.  Does anyone know of some Ruby scripting that could be used to correct this?  Off hand, I'm thinking of a macro inserted into the Price variable on the Component Panel of each structural member that would use the Material List row context to report a price that depends on how the row wants to use the Price.

Link to comment
Share on other sites

40 minutes ago, ccarpenter18 said:

Structural Member Reporting


which Type ?  by Default it uses Total Lineal Length , so if you haven't set up a SMR Method for your needs , eg Cut list , Buy list etc..... it will only show total Lft. 




Link to comment
Share on other sites

I've attached 3 photos of a material list.  The framing members appearing here all have a price of $0.58 as recorded in the Price variable of each framing member's Component Panel.  It is intended to be a "per foot" price.


The first attached photo (linear.png) shows the material list.  Note the "Linear Length" structural reporting method selection in the upper left.  This method shows an accurate subtotal price ($349.57) for framing.  Buy.png shows the same list with "Buy List" selected.  Note that the subtotal is substantially smaller ($46.98).  This is because Chief is still using the "per foot" price from each member rather than a "per member" price*, which is what it should be doing if the pricing is to be accurate for this type of reporting.  Finally, Mixed.png shows the same framing for "Mixed Reporting".  Half the list is "per foot" and the other half is "each" (ie "per member").  The subtotal price is $160.19, which is also inaccurate.


Since all prices are coming from the Component Panels, I'm wondering if there is a Ruby script, or at least Ruby NVPs I can use to adjust the reported price in the panels depending on how the price data is being used in the material list.


Hope this makes it a little clearer.  I'm not sure I have a solution.  For now I just ignore pricing in the material list for anything other than "linear".

*  or "per unit" price as I was using earlier -sorry if this caused any confusion




Link to comment
Share on other sites

If you are using the Component list to bring in the Lft Price then you'd need a (simple ?) macro in the total Cost column and you'd have to insert it if changing the SMR List Type....  you could make several macro and insert them from the M> Icon when needed too.


eg for Buy list assuming 9 ft Studs       =((count*9)+extra)*price


** I think you be better off just changing the price to $5.22 for a 9ft stud , the total is then automatic , it will be a lot trickier if you need to switch list types continually in the ML?


I have a feeling I am not understanding exactly what you are doing though...



Link to comment
Share on other sites

I'm trying to avoid a lot of manual insertion in the material list each time I toggle the SMR List Type.  Also, I regenerate the material list often.  In theory, at least, a macro in the Components Price column of each member could be designed to use the Ruby context of the material list line.  Once the member is used in a material list, it could use the material list context to sense the SMR List Type being used and whether the line represents a "per foot" or "per member" type of calculation to come up with the right pricing.


Of course, the BEST way to lick this problem is to do a Chief redesign so that the components panel always assumes a price-per-length value AND the material list uses the price plus the member's length (when appropriate) to calculate a price-per-member.  Short of that happening, I thought someone might have figured out a way to use Ruby to get around the problem.

Link to comment
Share on other sites

13 minutes ago, ccarpenter18 said:

I'm trying to avoid a lot of manual insertion in the material list each time I toggle the SMR List Type.  Also, I regenerate the material list often.  In theory, at least, a macro in the Components Price column of each member could be designed to use the Ruby context of the material list line.  Once the member is used in a material list, it could use the material list context to sense the SMR List Type being used and whether the line represents a "per foot" or "per member" type of calculation to come up with the right pricing.


If that is possible , Michael  ( Alaskan_Son above), would be one of the individuals on the Forum, to talk to directly about a Custom Macro.


Most people are not switching the Reporting style frequently , so my guess is your needs have not come onto Chief's Radar..... perhaps make a Suggestion in that forum.



Link to comment
Share on other sites

I've used Chief since X6 but am new to these forums.  Perhaps I selected the wrong one?  My SSA support person recommended I ask around in the forums to see if anyone had worked on the general topic of using Ruby with material lists.  I see Alaskan_Son inquired about this issue earlier so I suspect he will raise it elsewhere if he feels its important enough to pursue.  Thanks.

Link to comment
Share on other sites

14 minutes ago, ccarpenter18 said:

I've used Chief since X6 but am new to these forums.  Perhaps I selected the wrong one?

You are in the right forum. The Seeking Services forum would be the one to go to if you already knew you needed custom macros; or contact members directly who respond, such as Michael.

Link to comment
Share on other sites

I was a software developer for many years but am brand new to Ruby.  Know just enough to be dangerous!


Are there any docs that go rigorously into how to access all the Ruby contexts and NVPs available in Chief?  The one chapter on Ruby in the Tech Doc doesn't say much on this.


Link to comment
Share on other sites

Ridge_Runner, I'm not in the market to purchase a custom macro, if that is what you were suggesting.  I had assumed these forums are exchanges of free ideas and code that have been developed within the Chief user community for love of the product and the subject.  I understand we all have to make a living, so I'm not opposed to the concept of fee for service as a general proposition.  It's just that I can't afford such an undertaking at this point.


Link to comment
Share on other sites

1 minute ago, ccarpenter18 said:

Ridge_Runner, I'm not in the market to purchase a custom macro, if that is what you were suggesting.

My bad. I wasn't offering my services; I don't do custom macros but many of these guys do. Several on this forum do help with macro advice from time to time and from their own time. But they also offer custom macro work for those who need it for a reasonable fee.

Link to comment
Share on other sites

37 minutes ago, ccarpenter18 said:

No problem. I wasn't assuming you were offering macro services.  Was just trying to get a sense of the rules of the road, at least as to what one could expect on these forums.  Thanks.

The problem here is that situations like this almost invariably require code that only works for one specific use case scenario and so its not some simple pre-existing idea or code that you really need.  In this case, you need a very specifically (and creatively) designed, written, and configured code that meets your specific use case.  In other words, it requires someone to do the work. 


If you already know how, I could give you some quick tips, but otherwise I would just need to do the work for you.  Sometimes I feel like people think we're being stingy with our knowledge and ideas, but I could literally spend all day everyday answering followup questions to that free information I provide. 


Its akin to designing takes someone who knows what they're doing to get it done and its not something you can learn in a few posts.  This is why there are VERY few people here who know how to effectively write and use some of the more complex custom macros.  The investment is simply too great, and I would argue that its typically not even worth it either.  You could spend literally hundreds of hours getting it all figured out from a technical standpoint, but maybe you're not the creative type, so you still end up hitting roadblocks.  Plus, even if you are super good at devising creative solutions and you master Chief and you master Ruby, is it really worth all the hundreds of hours invested if you could simply pay somebody for a few hours of their time to do it for you?


Anyway, I don't have much extra time to play with right now, but here's some quick custom macros and general ideas on-the-house as a one time courtesy.  Just open the attached plans and see how I set the 2 joists up.  They both contain a slightly different solution depending on what your end goal is, but they both essentially do what you're trying to accomplish...


Material List price



Again, that was as a one-time courtesy.  Use it freely as you wish, but if you need further modifications, in depth explanations, or coaching, that would be a different story. 



Link to comment
Share on other sites

16 hours ago, ccarpenter18 said:

No problem. I wasn't assuming you were offering macro services.  Was just trying to get a sense of the rules of the road, at least as to what one could expect on these forums.  Thanks.


When posting a question one does not "expect", what you do is "Hope" a forum member will take interest in your dilemma and offer some advice/guidance that will assist you in resolving it. Don't expect to always receive a definitive answer, this will depend upon the complexity of your issue. What you should be hoping for is some guidance as to where you should focus your own efforts to resolve the problem. There are no rules other than to be polite and appreciative to those trying to assist you. Keep-in-mind that some users have developed over time extensive skills, knowledge and techniques that they may rightfully consider to be somewhat proprietary, it's not really fair to expect them to just divulge this in an open public forum. If you need access to this depth of knowledge then it is not unreasonable for them to desire a bit of compensation. I believe you will find that those members offering paid for support services likely provide exceptional value for what they charge. I'm just guessing here but if a macro costs you $100 or $200 and saves you half an hour of work each day then your return on investment is well worth it.

Link to comment
Share on other sites

Thanks Michael!  (My delay in responding was due to trying to click the download in the email sent to me by Chief rather than inside the Chief Forum environment and getting an error).  Your code is similar to something I had been playing with, except that I was going after the word "each" in the Price field rather than the hyphen in the Size field.  Discovered that "each" is not really part of the variable and is added by Chief dynamically.  Besides, I knew generally that using information from the same field you plan to modify is not likely to work.  So that was a show-stopper for me.


At any rate, I'll incorporate what you sent me and if I need further (paid) assistance I'll contact you.  BTW, you are very kind to provide this code snippet!  I wasn't expecting anyone to actually code anything on the spot.  Was just asking around to see if someone else had run across the same problem and had already coded a solution.


Thanks again,


  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Member Statistics

    Total Members
    Most Online
    Newest Member
  • Similar Content

    • By adam82
      Hello everyone.
      I'm a bit confused  about how the "components" tab works in CA at the Specification panels, and I can't find a clear description of it either on the forum or in the CA Help. Could someone help me understand it?
      My problem and my desired outcome is the following: 
      I have to design a French drain system around a slab. I want to put into the material list the pipes, the gravel around the pipes and the geotextile fabric around the gravel. The slab is quite big and has a complex shape, so I wanted to rely on the material list calculation rather then recalculation it by hand each time the plan is modified. 
      My idea was to use a polyline solid () for representing the gravel, and use its surface to represent the geotextile fabric.  The quantity of gravel should be calculated based on the volume, and the area of the geotextile should be calculated based on the surface area of the cube. Maybe this is not the right approach, but I couldn't find a better solution. 
      When I assign the gravel material to the cube, I automatically get a component that is calculated based on the volume.


      However, if I add another component to symbolize the geotextile, I can't use any macros for its surface area.

      I tried using "= automatic_count" but it always returns 1. If I create a macro in the CAD -> Text -> Text Macro Management window, it always throws an "Evaluation error" message.


      What determines the value returned by "= automatic_count"? And why can't I use it in a second component?
      Thank you very much ! 
    • By Allen43
      I recently updated to X15 and after doing so I have had a few problems. The last one I have to fix is my macro for auto cabinet label generation.
      I am by no means a programmer and I barely understood ruby when I made this macro. I have been trying to relearn but I still can't figure out what my problem is.
      I have attached my macro below and this is the error I have been getting:
      Evaluation Error: Ruby TypeError: no implicit conversion of nil into String
      Stack Trace:
      from eval:10:in `eval'
      from eval:10:in `block (2 levels) in <main>'
      from eval:4:in `loop'
      from eval:4:in `block in <main>'
      Any help is apricated. Thanks in advance!
    • By Scogginator
      Is there a way to write a custom command to auto-place lights?
      I've used chat GTP to write code that I'd like to utilize. I have attached a word file and pdf that I need proof read and corrected. I can have that done.
      Below is the code, but I'm not sure if it will format correctly:
      Sub PlaceLights()
          'Ask the user to select the room size and ceiling height
          Dim roomWidth As Double
          Dim roomLength As Double
          Dim roomHeight As Double
          roomWidth = InputBox("Enter the width of the room in feet:")
          roomLength = InputBox("Enter the length of the room in feet:")
          roomHeight = InputBox("Enter the height of the room in feet:")
          'Calculate the square footage of the room based on user input
          Dim roomArea As Double
          roomArea = roomWidth * roomLength
          'Determine the recommended lighting level for the room based on the ceiling height and room type
          Dim lightLevel As Double
          Select Case roomHeight
              Case Is <= 8
                  lightLevel = 10
              Case Is <= 9
                  lightLevel = 20
              Case Is <= 10
                  lightLevel = 30
              Case Is <= 12
                  lightLevel = 40
              Case Else
                  MsgBox "Invalid ceiling height"
                  Exit Sub
          End Select
          'Calculate the number of lights needed based on the room size and the recommended spacing
          Dim lightSpacing As Double
          If roomArea <= 100 Then
              lightSpacing = 48
          ElseIf roomArea <= 225 Then
              lightSpacing = 64
          ElseIf roomArea <= 400 Then
              lightSpacing = 80
              lightSpacing = 96
          End If
          Dim lightCount As Integer
          lightCount = Application.RoundUp((roomWidth + roomLength) / lightSpacing, 0)
          'Determine the optimal spacing for the lights based on the room size and ceiling height
          Dim xOffset As Double
          Dim yOffset As Double
          If roomWidth >= roomLength Then
              xOffset = lightSpacing
              yOffset = lightSpacing * roomLength / roomWidth
              xOffset = lightSpacing * roomWidth / roomLength
              yOffset = lightSpacing
          End If
          'Place the lights in a rectangular or square pattern within the room
          Dim lightType As String
          lightType = InputBox("Enter the light diameter (4 or 6):")
          Dim x As Integer
          Dim y As Integer
          Dim light As Object
          For x = 1 To lightCount
              For y = 1 To lightCount
                  Set light = ActiveDocument.CreateLight("Recessed Can Light", lightType & """", "General")
                  light.Move (x - 1) * xOffset, (y - 1) * yOffset, roomHeight - 48
              Next y
          Next x
          'Generate a report or summary of the lighting plan for the room
          Dim report As String
          report = "Room Size: " & roomWidth & " ft x " & roomLength & " ft" & vbCrLf
          report = report & "Ceiling Height: " & roomHeight & " ft" & vbCrLf
          report = report & "Recommended Light Level: " & lightLevel & " lux" & vbCrLf
          report = report & "Number of Lights: " & lightCount ^ 2 & vbCrLf
          report = report & "Light Spacing: " & lightSpacing & " in" & vbCrLf
          report = report & "Light Type: " & lightType & """ Recessed Can Light" & vbCrLf
          MsgBox report
      Any help would be appreciated.
      Sub PlaceLights.docx Sub PlaceLights.pdf
    • By HumbulRenovator
      I am creating a design for my home renovation and have a spot where I want to run a rafter over a load-bearing wall or beam. I figured the rafters would be split into two groups at this bearing point.
      Is there a way to do this in Chief? I'm at the top version now: Architect Premier X14.
      I've tried beams and fake walls but I can't seem to find anything to trigger a break point. It looks like for floor joists there are some options to this effect but I can't find anything for roofs/rafters.
      I've attached my test project for this concept.

    • By COMSTOCKL35
      Hello everyone,
      having an issue getting x14 to report the information my estimator is asking for. we primarily focus on remodels, therefore a vast majority of our projects require demo work. we stick estimate and account for sf, lf, area, and each of items for removal. In a lot of cases this is not a across the board or entire area basis or even within complete room. My team has been inquiring if the program has the arability to produce a schedule i can put on layout so they don't have to physically do the calcs for the area of drywall being removed then reinstalled. i understand i have to run a material list to have the program run the total. i have figured out how to get the program to total Base, Casing, Flooring, Ceiling area, electrical and plumbing fixtures. im wanting to see if there is some way i can set this up to pull with the ease of a schedule without having to go in and create a material list for each room involved write down the area from that then say create a room list for every program. thining there might be a macro or some way to achieve this in a custom schedule and have ran into a wall every way ive tried to run it or set it up. i will attach the current project im working on for reference. the rooms im looking to complete said schedule or report are listed in the room area schedule to the right of the 1st floor plan23-6416-Newton-Existing.plan