10 Replies Latest reply on Apr 16, 2018 6:50 AM by Mark Greenwell

    Part Information

    Mark Greenwell

      Hi,

       

      Does anyone have a macro they would be willing to share or know of a way to do the following.

       

      In either an assembly or multi-bodied part R-Click on an individual part and have the option from the drop down to see a part parameters description box.

       

      This description box would show the part mark, length, width, thickness, grade, and quantity.

       

      Is this possible?

       

      Thanks

       

      Mark

        • Re: Part Information
          Glenn Schroeder

          You might get more help with that if you'll move this Discussion to the API section of the forum.  Please don't start a new one; there's a Move link near the top right.

           

          • Re: Part Information
            Josh Brady

            I'm not sure if it's possible (definitely not straightforward) to add a new labeled item to the right-click menu.  It is possible to add a macro button to the "context toolbar" or the "shortcut toolbar".

             

            As far as the length, width, etc. that you're looking for, where does that info come from?  Is it already entered into custom properties somehow?  How does that apply to multibody parts?

             

            I assume you're aware of the Custom Property Tab and its associated Custom Property Tab Builder tool, and this does not fit your need?

             

            Do you want to just display that info, or do you want to enter data for use later?

             

            How do you want to use that data later?

             

            I don't know of anything available now for free.  Someone could probably write it for you with more info.  Probably not for free, but there are a number of folks here who do that kind of thing.

              • Re: Part Information
                Mark Greenwell

                   Hi Josh,

                 

                If it was multi bodied part converted to a weldment with bounding boxes then the length width and size grade and qty could be taken from there. I suppose for assemblies you could take information from custom properties.

                 

                I am aware of the tab builder but its not what I am looking for.

                 

                I don't know if you are familiar with Tekla, but selecting a part in an X-Steel model gives you that parts attributes, I was looking for something similar.

                 

                Thanks

                 

                Mark

                  • Re: Part Information
                    Josh Brady

                    Sorry, I'm not familiar with Tekla. 

                     

                    Is this something you'd be interested in getting a quote for, or is it just a sorta "dangit, I wish this existed" thing?

                      • Re: Part Information
                        Mark Greenwell

                        Hi Josh,

                         

                        Tekla (X-steel) is a 3D structural steel modelling software mainly used for buildings, bridge etc and is probably the industry standard  for that type of work.

                         

                        Unfortunately as we have Tekla draughtsmen in the company I work for I wouldn't be able to source any money to pay someone to create something similar, so yeah I was hoping SolidWorks had something similar.

                         

                        Thanks for your time

                         

                        Mark

                  • Re: Part Information
                    Dan Clubley

                    Hi Mark,

                     

                    You can add a custom macro button to the right click menu, it will be shown at the top as a small icon button.

                     

                    You could instruct the macro to create a standard message box showing either the file custom properties or the cut list properties depending on what you have selected. Either way, the custom properties will have to already have been created for part mark, length, width, thickness, grade, and quantity.

                     

                    Is this what you mean?

                      • Re: Part Information
                        Mark Greenwell

                        Hi

                         

                        To be honest most of that went over my head I'm no good at creating VBA or macros, all I wanted to be able to do is either in an assembly or multi bodied part is click on a part and have a box appear with that parts properties.

                         

                        I was sure you could get something similar in Inventor but is years since I last used that program,

                         

                        Thanks

                         

                        Mark

                      • Re: Part Information
                        Amen Allah Jlili

                        It's possible to do add a menu item to the right-click menu in SOLIDWORKS. Actually, they are called "context-sensitive right-click menu items". BUT, I have had a lot of issues getting them to work in the 3D space (for example, you can't add menu items to the component right-click context-sensitive menu in the 3D space but you can in the feature tree). It has something to do with geometrical entities menu items taking precedence the component menu. I have reported that months ago and they're working on it.

                         

                        Getting the quantity is computationally expensive.... (especially in large assemblies).  Assuming that you had something wrong, it will take  2-3 seconds (eventually this will take longer if the assembly is very large) to get the quantity of a component in a large assembly which over time can be frustrating for right-click-menus because the expectations are that the menu would show instantaneously.


                        I personally think it would be better for a context menu to show your description box in a new window.

                         

                        Cheers,
                        Amen
                        SolidWorks /PDM API Training & Consulting

                          • Re: Part Information
                            Mark Greenwell

                            Hi,

                             

                            I thought (maybe wrongly ) that if it was multi bodied part I could convert it to a weldment with bounding boxes then the length width and size grade and qty could be taken from there. I suppose for assemblies you could take information from custom properties.

                             

                            I would have to go with your suggestion for a description box in a new window as obviously you know more about the internal working of SolidWorks than I do, and I don't know enough about this to offer another suggestion.

                             

                            Thanks

                             

                            Mark