0 Replies Latest reply on Dec 1, 2016 7:49 AM by zaher taleb

    How to insert Block in selected point on the Drawing

    zaher taleb

      Hi all,

      I tried to make macro to insert a block, the macro inserts the block at the x=0, Y=0.  but i want to insert the block in selected point!!

      thanks

       

       

       

      Private Sub CommandButton2_Click()

      Set swApp = _

      Application.SldWorks

       

       

      Set Part = swApp.ActiveDoc

      Dim myBlockDefinition As Object

       

       

      Set myBlockDefinition = Part.SketchManager.MakeSketchBlockFromFile(Nothing, "C:\Users\User1\Desktop\test.SLDBLK", False, 1, 0)

      End Sub