41 Replies Latest reply on Mar 15, 2017 1:34 AM by Deepak Gupta

    Cut-list Property Macro

    Paul Vandenberk

      I am looking for a macro that will allow me to select a specific cut-list in my part, and modify the cut-list properties of the selected cut-list. As an example, with Cut-List1 selected, the macro would edit the Cut-list properties to alter the description property and add the Length property. The values of the properties would be then cut and paste from existing properties such as bounding box width and bounding box length would be copy and pasted into the length property together.

        • Re: Cut-list Property Macro
          Matt Martens

          The method for managing cut list properties is to get the IFeature object of the cut list folder and use IFeature::CustomPropertyManager to access the properties. From there, use ICustomPropertyManager::Get4 and ICustomPropertyManager::Set2.

            • Re: Cut-list Property Macro
              Paul Vandenberk

              Can you provide me with an example? I have done some macros in SW but am still very green with the structuring.

                • Re: Cut-list Property Macro
                  Matt Martens

                  Do you plan on running the macro before you select the cut-list folder or after?

                    • Re: Cut-list Property Macro
                      Paul Vandenberk

                      After I select the cut-list item. I originally thought of telling it to run for every cut-list but I only need the macro to run for sheet metal cut-list and not weldment ones.

                        • Re: Cut-list Property Macro
                          Matt Martens

                          Here is a basic start. Run the macro after selecting a cut list folder. It will print the name of the folder in the immediate window, assign the description custom property value to a string variable, print that to the immediate window, and add a new custom property "Length" whose value will be the same as the description.

                            • Re: Cut-list Property Macro
                              Paul Vandenberk

                              Wow that is actually really helpful. I do have a couple questions though.

                               

                              1) What is the 0 for in the Get4 command?

                              2) I am also adding to the program to copy the sheet thickness to the description but I want to change the number displayed in the description so that if the evaluated value is 0.1196" instead it shows up as 11 Ga. Is there any way to setup solidworks to always do this?

                              3) Will Add3 overwrite an existing property? For example if description already exists and I use Add3 will it simply overwrite it?

                                • Re: Cut-list Property Macro
                                  Matt Martens

                                  1) What is the 0 for in the Get4 command?

                                  The place where the 0 is located is reserved for the evaluated value of the property (i.e. the value that appears when you have linked values that appear in quotes). Because VBA requires something to be there I use 0 so it doesn't get mistakenly used somewhere else. You may need to place you variable there but remember it will be the evaluated value.

                                  2) I am also adding to the program to copy the sheet thickness to the description but I want to change the number displayed in the description so that if the evaluated value is 0.1196" instead it shows up as 11 Ga. Is there any way to setup solidworks to always do this?

                                  I experimented with this a while back and the only way i could find to push through the guage value was through a macro that would read the excel spreadsheet of the guage table. It can be done but you would be getting into more complex VBA code. You may want to hold off on trying it until you get some more experience with writing macros.

                                  3) Will Add3 overwrite an existing property? For example if description already exists and I use Add3 will it simply overwrite it?

                                  The way I have it written, yes. The last argument is used for that situation. "swCustomPropertyDeleteAndAdd" is the call to delete the existing property and add the new one. Look in the API help if this is not what you want.

                                    • Re: Cut-list Property Macro
                                      Paul Vandenberk

                                      Thank you very much Matt. I think I will do part of the code to check the evaluated value in order to see if it is a particular gauge size. If it is, instead of linking the thickness into the description I will get the macro to put a value in manually. The user will have to re-run the macro every time the gauge changes but it's still better than nothing for now.

                                       

                                      As a side question, how did you become so familiar with SW macro structure and programming? I have experience with excel VBA hence my general understanding for SW macros.

                                        • Re: Cut-list Property Macro
                                          Matt Martens

                                          Same as you. I tried a few of the free macros online (the one that really got me going was created by Stephen Burke and involved exporting PDFs from Workgroup PDM) and after poking and prodding through them learned the basic VBA structure and went on from there. Whenever I find something in the software I wish would work easier I open the VBA editor and plug away. I never really took any programming classes so some of my code turns out a little jumbled. I have a few macros that allows me to interact with a MS Access database and also one in Excel that interacts with SW and WPDM.

                                          • Re: Cut-list Property Macro
                                            Matt Martens

                                            I also learned a lot by looking through API help and on these forums.

                                          • Re: Cut-list Property Macro
                                            Paul Vandenberk

                                            Also, for the True statement for cached value if I leave it as false will this force the cut-list to update before running?

                                              • Re: Cut-list Property Macro
                                                Matt Martens

                                                I'm not sure what changes when you use False instead of True. Try it out while printing to the immediate window to see the difference.

                                                  • Re: Cut-list Property Macro
                                                    Paul Vandenberk

                                                    So I am trying to add to the code for it to switch between the user settings of decimal and fraction for units displayed. Below is the code that I have but I keep getting an error 91 for the SetUserPreferenceInteger portion.

                                                     

                                                    Sub main()

                                                     

                                                     

                                                    Set swSelMgr = Application.SldWorks.ActiveDoc.SelectionManager

                                                    Set swFeat = swSelMgr.GetSelectedObject6(1, -1)

                                                     

                                                     

                                                    swFeat.CustomPropertyManager.Get4 "Bounding Box Length", True, boundingBoxLength, 0

                                                    swFeat.CustomPropertyManager.Get4 "Bounding Box Width", True, boundingBoxWidth, 0

                                                     

                                                     

                                                    swModel.Extension.SetUserPreferenceInteger swUserPreferenceIntegerValue_e.swUnitsLinearDecimalDisplay, 0, swFractionDisplay_e.swDECIMAL

                                                    swModel.EditRebuild3

                                                     

                                                     

                                                    swFeat.CustomPropertyManager.Get4 "Sheet Metal Thickness", True, 0, sheetThickness

                                                     

                                                     

                                                    swModel.Extension.SetUserPreferenceInteger swUserPreferenceIntegerValue_e.swUnitsLinearFractionDenominator, 0, 16

                                                    swModel.EditRebuild3

                                                     

                                                     

                                                    Debug.Print sheetThickness

                                                      • Re: Cut-list Property Macro
                                                        Matt Martens

                                                        In the help it says use "swDetailingNoOptionSpecified" for reference option when none is required. Try that in place of the 0.

                                                          • Re: Cut-list Property Macro
                                                            Paul Vandenberk

                                                            Still no luck. Run-time error 91. Object variable or With block variable not set.

                                                            • Re: Cut-list Property Macro
                                                              Paul Vandenberk

                                                              Oh do I need to Set swModel to something first?

                                                                • Re: Cut-list Property Macro
                                                                  Paul Vandenberk

                                                                  Ya that did it. I had to add the line Set swModel = Application.Sldworks.ActiveDoc

                                                                  • Re: Cut-list Property Macro
                                                                    Matt Martens

                                                                    Usually my first two lines of a macro would set the application object and the active model object but i skipped that on the example i provided.

                                                                     

                                                                    Set swApp = Application.SldWorks

                                                                    Set swModel = swApp.ActiveDoc

                                                                    1 person found this helpful
                                                                      • Re: Cut-list Property Macro
                                                                        Paul Vandenberk

                                                                        Hate to keep pestering you. I noticed that if the thickness changes the cut list isn't automatically rebuilt when I hit rebuild or use EditRebuild3. Is there a way to force the cut list to re-build? I want to make the macro rebuild the list at the beginning. I tried using

                                                                         

                                                                        Set solidBodyFolder = swFeat.GetSpecificFeature2

                                                                        solidBodyFolder.UpdateCutList

                                                                          • Re: Cut-list Property Macro
                                                                            Matt Martens

                                                                            That because the swFeat is holding the cut list folder not the solid bodies folder. You need to get the the solid bodies folder to update the cut list. I'm looking for the best way right now. I'll get back to you.

                                                                            • Re: Cut-list Property Macro
                                                                              Matt Martens

                                                                              You were actually pretty close.

                                                                              Set solidBodyFolder = swFeat.GetSpecificFeature2

                                                                              solidBodyFolder.UpdateCutList

                                                                              needs to be this:

                                                                              Set solidBodyFolder = swFeat.GetOwnerFeature.GetSpecificFeature2

                                                                              solidBodyFolder.UpdateCutList

                                                                              1 person found this helpful
                                                                                • Re: Cut-list Property Macro
                                                                                  Paul Vandenberk

                                                                                  I have added code to check if they haven't selected anything via

                                                                                   

                                                                                  If swFeat Is Nothing

                                                                                   

                                                                                  however how can I check if they have selected the solid body folder instead of a specific cut list?

                                                                                    • Re: Cut-list Property Macro
                                                                                      Matt Martens

                                                                                      Yeah. Check if the feature name is "Solid Bodies".

                                                                                       

                                                                                      I am going offline now. Done with work.

                                                                                        • Re: Cut-list Property Macro
                                                                                          Paul Vandenberk

                                                                                          Thank you very much Matt! I greatly appreciate all your help.

                                                                                            • Re: Cut-list Property Macro
                                                                                              Erik Droogendijk

                                                                                              Hey Paul,

                                                                                               

                                                                                              I am looking exactly for the macro you created! (May it be some years later)

                                                                                              For all sheet metal parts i want the thicknes in the cutlist description, and i want "boudingboxlength x boundingboxwidth" in the length row.

                                                                                              Now i do this by copying the formulas to the cells manually, but since half of the time the formulas are somehow not on the clipboard this is a time consuming act.

                                                                                               

                                                                                              Can you upload your final code?

                                                                                                • Re: Cut-list Property Macro
                                                                                                  Deepak Gupta

                                                                                                  You can not change the length property in the cut list for bodies created using weldment profile.

                                                                                                    • Re: Cut-list Property Macro
                                                                                                      Erik Droogendijk

                                                                                                      What I mean is changing the properties of sheet metal bodies in a weldment, so that they are shown in the cut-list on the drawing.

                                                                                                      Until now I do this manually for all sheets in a weldment by adding rows and copy and paste the formulas from the bounding box and thickness rows:

                                                                                                      Presentatie2.png

                                                                                                      It would be great to have a macro to do this, and i am willing to put some effort in it, because in the end it will save a lot of time.

                                                                                                      The only thing is that i am a beginner with VBA. That is why i would like to have Paul's code so i have a basis.

                                                                                                        • Re: Cut-list Property Macro
                                                                                                          Deepak Gupta

                                                                                                          I've not tried it but I'm sure it can be done. I'll take a shot at it later

                                                                                                            • Re: Cut-list Property Macro
                                                                                                              Erik Droogendijk

                                                                                                              Thanks a lot in advance!

                                                                                                                • Re: Cut-list Property Macro
                                                                                                                  Deepak Gupta

                                                                                                                  Erik, try the attached macro. Change as needed.

                                                                                                                    • Re: Cut-list Property Macro
                                                                                                                      Erik Droogendijk

                                                                                                                      Hi Deepak,

                                                                                                                       

                                                                                                                      This is great! Exactly what I needed, and it looks so simple.
                                                                                                                      I added the remarks property with "DXF" as value.

                                                                                                                       

                                                                                                                      Thanks a lot for your help!

                                                                                                                        • Re: Cut-list Property Macro
                                                                                                                          Rhys Gardner

                                                                                                                          Hi Erik,

                                                                                                                           

                                                                                                                          This is a great little thread, our company has been in need of this functionality for some time now. Forgive my experience with the API too...I've tried to get it working but no luck yet, so a couple of questions...

                                                                                                                           

                                                                                                                          1. Do you create a custom property for Length & Width before running the Macro?
                                                                                                                          2. But at which stage do you run this macro? I saw a note in the thread saying its when the 'folder is selected', i tried this once in the cultist property area, but SW doesn't let you access the macros at that stage. I tried expanding the 'Cutlist' to the first level and then running the macro, but no new custom property is added to the 'custom property table'
                                                                                                                          3. Should i simply be able to run the macro 'Update Sheet Metal Cut List Properties.swp.zip' into my Solidworks sheet metal part and run? Or is there some other type of setup i would need to do first?

                                                                                                                           

                                                                                                                          Any advice would be much appreciated!

                                                                                                                           

                                                                                                                          Rhys

                                                                                                                            • Re: Cut-list Property Macro
                                                                                                                              Deepak Gupta

                                                                                                                              Rhys, this macro only looks for cut list items having name as Sheet and update properties for them. So make sure you've this option ticked

                                                                                                                               

                                                                                                                               

                                                                                                                              This will rename cut list name for sheet metal component as Sheet

                                                                                                                               

                                                                                                                              Do you create a custom property for Length & Width before running the Macro?

                                                                                                                              NO but your cut list should be updated to auto generate these (right click on cut list and select update). This can be done via macro also.

                                                                                                                               

                                                                                                                              But at which stage do you run this macro?

                                                                                                                              You do not need to select anything and simply run the macro (provided you've update the cut list manually OR have the option selected to auto update

                                                                                                                               

                                                                                                                               

                                                                                                                              Should i simply be able to run the macro 'Update Sheet Metal Cut List Properties.swp.zip' into my Solidworks sheet metal part and run

                                                                                                                              Yes. I've attached the updated macro which would update the cut list also.

                                                                                                                                • Re: Cut-list Property Macro
                                                                                                                                  Rhys Gardner

                                                                                                                                  I got it.. i see now the functionality now...

                                                                                                                                   

                                                                                                                                  In our application we are looking for one step further and i'm not sure if its possible... but i'll try to explain;

                                                                                                                                   

                                                                                                                                  Is is possible to take that value from LENGTH i.e (strValue1 x strValue2) to go populate a custom property field in the part itself? It is ok is the 2 values are split in to 2 field and also ok if they are either a number or a string.

                                                                                                                                   

                                                                                                                                  See the image below; What we need is for this to be available in the sketch mode, as a text note by clicking the (1) Link to property' button, then either (2) SW Property OR (3) Custom Property. (Once this is updated we use another CAM plugin to engrave the sheet sizes using this this sketch, currently its quite time consuming to manually enter this in)

                                                                                                                                   

                                                                                                                                   

                                                                                                                                  Much appreciate the assistance in advance!

                                                                                                                                   

                                                                                                                                  Rhys

                                                                                                                                    • Re: Cut-list Property Macro
                                                                                                                                      Deepak Gupta

                                                                                                                                      Yes it can be done (actually just made a similar macro). Check this post: https://forum.solidworks.com/message/724348#comment-724348

                                                                                                                                       

                                                                                                                                      The macro add a configuration property. But if you need custom property then change this line

                                                                                                                                       

                                                                                                                                      Set swCustPropMgr = swModel.Extension.CustomPropertyManager(swModel.ConfigurationManager.ActiveConfiguration.Name)

                                                                                                                                      to

                                                                                                                                       

                                                                                                                                      Set swCustPropMgr = swModel.Extension.CustomPropertyManager("")

                                                                                                                                        • Re: Cut-list Property Macro
                                                                                                                                          Rhys Gardner

                                                                                                                                          Deepak, That's great thankyou!

                                                                                                                                           

                                                                                                                                          Quick question, how would you set the code up for multiple bodies?

                                                                                                                                           

                                                                                                                                          ie. Duplicate section of code like below? I have had a couple of attempts -managed to get the 2 fields to export to the custom properties, but no actual values in there. We did change the strValue's for the 2nd body, but seem to only get debug errors. -Not sure we are going about this the right way...?.?

                                                                                                                                           

                                                                                                                                          If swFeat.GetTypeName = "SolidBodyFolder" Or swFeat.GetTypeName = "CutListFolder" Or swFeat.GetTypeName = "SubWeldFolder" Then

                                                                                                                                                      Set swBodyFolder = swFeat.GetSpecificFeature2

                                                                                                                                                      swBodyFolder.UpdateCutList

                                                                                                                                                         

                                                                                                                                                          If UCase(swFeat.Name) Like "*1A*" Then

                                                                                                                                                              Set swCustPropMgr = swFeat.CustomPropertyManager

                                                                                                                                                                  swCustPropMgr.Get4 "Bounding Box Width", False, strValue2, strValue3

                                                                                                                                                                  swCustPropMgr.Get4 "Bounding Box Length", False, strValue4, strValue5

                                                                                                                                                          End If

                                                                                                                                                      End If

                                                                                                                                                  Set swFeat = swFeat.GetNextFeature

                                                                                                                                                  Loop

                                                                                                                                                 

                                                                                                                                                  Set swCustPropMgr = swModel.Extension.CustomPropertyManager("")

                                                                                                                                                  swCustPropMgr.Add3 "1A", 30, strValue3 & " X " & strValue5, 1

                                                                                                                                                 

                                                                                                                                                          If UCase(swFeat.Name) Like "*1B*" Then

                                                                                                                                                              Set swCustPropMgr = swFeat.CustomPropertyManager

                                                                                                                                                                  swCustPropMgr.Get4 "Bounding Box Width", False, strValue6, strValue7

                                                                                                                                                                  swCustPropMgr.Get4 "Bounding Box Length", False, strValue8, strValue9

                                                                                                                                                        

                                                                                                                                                      End If

                                                                                                                                                  Set swFeat = swFeat.GetNextFeature

                                                                                                                                                      

                                                                                                                                                  Set swCustPropMgr = swModel.Extension.CustomPropertyManager("")

                                                                                                                                                  swCustPropMgr.Add3 "1A", 30, strValue7 & " X " & strValue9, 1

                                                                                                                                            • Re: Cut-list Property Macro
                                                                                                                                              Deepak Gupta

                                                                                                                                              Make sure these properties exits for both members.

                                                                                                                                              Bounding Box Width

                                                                                                                                              Bounding Box Length

                                                                                                                                              You have defined the strValue6 to strValue9 variables as strings

                                                                                                                                              Dim strValue6           As String

                                                                                                                                              Dim strValue7           As String

                                                                                                                                              Dim strValue8           As String

                                                                                                                                              Dim strValue9          As String

                                                                                                                                              Finally use

                                                                                                                                              Set swCustPropMgr = swModel.Extension.CustomPropertyManager("")

                                                                                                                                              swCustPropMgr.Add3 "1A", 30, strValue3 & " X " & strValue5, 1

                                                                                                                                              swCustPropMgr.Add3 "1B", 30, strValue7 & " X " & strValue9, 1

                                                                                                                                                • Re: Cut-list Property Macro
                                                                                                                                                  Rhys Gardner

                                                                                                                                                  Thanks Deepak,

                                                                                                                                                   

                                                                                                                                                  1. I defined the STR6 - 7 as strings.
                                                                                                                                                  2. Both members do have 'Bounding box Width & Height'
                                                                                                                                                  3. Added the bottom text at you

                                                                                                                                                  However the 1A & 1B produce the same result values from the 1st body 1A. I've pasted the code below, can you see what may be causing this?

                                                                                                                                                   

                                                                                                                                                  Option Explicit

                                                                                                                                                      Dim swApp               As SldWorks.SldWorks

                                                                                                                                                      Dim swModel             As SldWorks.ModelDoc2

                                                                                                                                                      Dim swFeat              As SldWorks.Feature

                                                                                                                                                      Dim swCustPropMgr       As SldWorks.CustomPropertyManager

                                                                                                                                                      Dim strValue0           As String

                                                                                                                                                      Dim strValue1           As String

                                                                                                                                                      Dim strValue2           As String

                                                                                                                                                      Dim strValue3           As String

                                                                                                                                                      Dim strValue4           As String

                                                                                                                                                      Dim strValue5           As String

                                                                                                                                                      Dim strValue6           As String

                                                                                                                                                      Dim strValue7           As String

                                                                                                                                                      Dim strValue8           As String

                                                                                                                                                      Dim strValue9           As String

                                                                                                                                                     

                                                                                                                                                      Dim swBodyFolder        As SldWorks.BodyFolder

                                                                                                                                                     

                                                                                                                                                  Sub main()

                                                                                                                                                      On Error Resume Next

                                                                                                                                                       

                                                                                                                                                      Set swApp = Application.SldWorks

                                                                                                                                                      Set swModel = swApp.ActiveDoc

                                                                                                                                                      Set swFeat = swModel.FirstFeature

                                                                                                                                                   

                                                                                                                                                          Do While Not swFeat Is Nothing

                                                                                                                                                             

                                                                                                                                                              If swFeat.GetTypeName = "SolidBodyFolder" Or swFeat.GetTypeName = "CutListFolder" Or swFeat.GetTypeName = "SubWeldFolder" Then

                                                                                                                                                              Set swBodyFolder = swFeat.GetSpecificFeature2

                                                                                                                                                              swBodyFolder.UpdateCutList

                                                                                                                                                                 

                                                                                                                                                                  If UCase(swFeat.Name) Like "*1A*" Then

                                                                                                                                                                      Set swCustPropMgr = swFeat.CustomPropertyManager

                                                                                                                                                                          swCustPropMgr.Get4 "Bounding Box Width", False, strValue2, strValue3

                                                                                                                                                                          swCustPropMgr.Get4 "Bounding Box Length", False, strValue4, strValue5

                                                                                                                                                                  End If

                                                                                                                                                              End If

                                                                                                                                                          Set swFeat = swFeat.GetNextFeature

                                                                                                                                                          Loop

                                                                                                                                                                  If UCase(swFeat.Name) Like "*1B*" Then

                                                                                                                                                                      Set swCustPropMgr = swFeat.CustomPropertyManager

                                                                                                                                                                          swCustPropMgr.Get4 "Bounding Box Width", False, strValue6, strValue7

                                                                                                                                                                          swCustPropMgr.Get4 "Bounding Box Length", False, strValue8, strValue9

                                                                                                                                                                  End If

                                                                                                                                                             

                                                                                                                                                          Set swFeat = swFeat.GetNextFeature

                                                                                                                                                      

                                                                                                                                                         

                                                                                                                                                          Set swCustPropMgr = swModel.Extension.CustomPropertyManager("")

                                                                                                                                                              swCustPropMgr.Add3 "1A", 30, strValue3 & " X " & strValue5, 1

                                                                                                                                                              swCustPropMgr.Add3 "1B", 30, strValue7 & " X " & strValue9, 1

                                                                                                                                                                      

                                                                                                                                                  End Sub

                                                                                                                                                    • Re: Cut-list Property Macro
                                                                                                                                                      Deepak Gupta

                                                                                                                                                      Hi Rhys, you were almost there. I've corrected and simplified the codes (per my knowledge of API)

                                                                                                                                                       

                                                                                                                                                      Option Explicit
                                                                                                                                                          Dim swApp               As SldWorks.SldWorks
                                                                                                                                                          Dim swModel             As SldWorks.ModelDoc2
                                                                                                                                                          Dim swFeat              As SldWorks.Feature
                                                                                                                                                          Dim swCustPropMgr       As SldWorks.CustomPropertyManager
                                                                                                                                                          Dim strValue(7)         As String
                                                                                                                                                          Dim swBodyFolder        As SldWorks.BodyFolder
                                                                                                                                                        
                                                                                                                                                      Sub main()
                                                                                                                                                          On Error Resume Next
                                                                                                                                                              
                                                                                                                                                          Set swApp = Application.SldWorks
                                                                                                                                                          Set swModel = swApp.ActiveDoc
                                                                                                                                                          Set swFeat = swModel.FirstFeature
                                                                                                                                                          
                                                                                                                                                              Do While Not swFeat Is Nothing
                                                                                                                                                                    
                                                                                                                                                                  If swFeat.GetTypeName = "SolidBodyFolder" Or swFeat.GetTypeName = "CutListFolder" Or swFeat.GetTypeName = "SubWeldFolder" Then
                                                                                                                                                                  Set swBodyFolder = swFeat.GetSpecificFeature2
                                                                                                                                                                  swBodyFolder.UpdateCutList
                                                                                                                                                                        
                                                                                                                                                                      If UCase(swFeat.Name) Like "*1A*" Then
                                                                                                                                                                              swFeat.CustomPropertyManager.Get4 "Bounding Box Width", False, strValue(0), strValue(1)
                                                                                                                                                                              swFeat.CustomPropertyManager.Get4 "Bounding Box Length", False, strValue(2), strValue(3)
                                                                                                                                                                       
                                                                                                                                                                      ElseIf UCase(swFeat.Name) Like "*1B*" Then
                                                                                                                                                                              swFeat.CustomPropertyManager.Get4 "Bounding Box Width", False, strValue(4), strValue(5)
                                                                                                                                                                              swFeat.CustomPropertyManager.Get4 "Bounding Box Length", False, strValue(6), strValue(7)
                                                                                                                                                                      End If
                                                                                                                                                                  End If
                                                                                                                                                                
                                                                                                                                                              Set swFeat = swFeat.GetNextFeature
                                                                                                                                                              Loop
                                                                                                                                                                
                                                                                                                                                              Set swCustPropMgr = swModel.Extension.CustomPropertyManager("")
                                                                                                                                                              swCustPropMgr.Add3 "1A", 30, strValue(1) & " X " & strValue(3), 1
                                                                                                                                                              swCustPropMgr.Add3 "1B", 30, strValue(5) & " X " & strValue(7), 1
                                                                                                                                                                                
                                                                                                                                                      End Sub