atricot  
                
               
                 
              
                  
                    September 11, 2015, 11:19am
                   
                   
              1 
               
             
            
              Hello
I'm doing a macro in vb on SolidWorks but I'm stuck on one thing.
Anyone have any idea what code is needed to remove the bend lines on my drawing?
In one case I have to keep them but for an application I have to delete them!
 
Thank you in advance.
mep.jpg 
             
            
               
               
               
            
            
                 
                 
              
           
          
            
              
                pl  
                
               
              
                  
                    September 11, 2015, 12:02pm
                   
                   
              2 
               
             
            
              Hello
This code should do the trick:
  
Dim swApp                   As SldWorks.SldWorks 
Dim swModel                 As SldWorks.ModelDoc2 
Dim boolstatus As Boolean 
 
Sub main() 
 
Set swApp = Application.SldWorks 
Set Part = swApp.ActiveDoc 
 
boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e.swShowSheetMetalBendNotes, 0, False) 
 
End Sub 
             
            
               
               
              1 Like 
            
            
                 
                 
              
           
          
            
              
                pl  
                
               
              
                  
                    September 11, 2015, 12:02pm
                   
                   
              3 
               
             
            
              At the time for me, this code is useful for notes, but not bend lines. There is no possibility a priori.
Note: in general these lines do not bother because they are discontinuous.
You can create a DXF of the part directly from the 3D:
Right-click  Expanded State  in the FeatureManager Design Tree and select  Export to DXF/DWG . 
Edit: otherwise see this option: 
http://help.solidworks.com/2013/French/solidworks/sldworks/t_Toggling_the_Visibility_of_Bend_Region_Lines.htm
 
             
            
               
               
               
            
            
                 
                 
              
           
          
            
              
                atricot  
                
               
              
                  
                    September 11, 2015, 12:07pm
                   
                   
              4 
               
             
            
              Thank you for your quick answers.
I'm going to try it right now.
I'll keep you posted (as soon as possible I hope).
             
            
               
               
              1 Like 
            
            
                 
                 
              
           
          
            
              
                atricot  
                
               
              
                  
                    September 11, 2015, 12:17pm
                   
                   
              5 
               
             
            
              Indeed I already apply this code in my macro for bend notes but it doesn't work anything for bend lines.
I knew about DXF export from 3D but it doesn't fit into my process.
 
I've also already tested disabling the bend lines in the bend area but it doesn't work (or I don't know how to use it).
 
Thank you very much in any case.
It's nice to know that we're not alone!!
             
            
               
               
              1 Like 
            
            
                 
                 
              
           
          
            
              
                pl  
                
               
              
                  
                    September 11, 2015, 12:25pm
                   
                   
              6 
               
             
            
              According to this message, it worked:
https://forum.solidworks.com/thread/58812
See also:
https://www.youtube.com/watch?v=tK5a3evQiO4
 
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              Impossible to do it directly by macro so I give the hand back to the user who selects the fold (or lines manually) and then I finish the execution of the macro.
I haven't found anything better at the moment.