4 Replies Latest reply on Jul 13, 2016 8:53 AM by Bastian Hoeveler

    Surface to Sheet

    Bastian Hoeveler

      Hi everyone

      As part of a longer Visual Basic Program for Solidworks a sheet body shall created from a surface.

      For this step I use following elements and code line.

       

      Dim oberflas As SldWorks.Surface

      Dim oberf As SldWorks.Body2

      Dim uvrange(1) As Double

      uvrange(0) = 0: uvrange(1) = 4: 'uvrange(2) = 0: uvrange(3) = 4:

      Dim uvvar As Variant

      uvvar = uvrange

       

      oberf = swModeler.ICreateSheetFromSurface2(oberflas, uvvar)

       

      Compiling this line  I get the error message wrong element type "uvvar".

      I wonder how exactly shall uvvar look like. Which information and how many elements shall be obtained?

      The definition from the manual does not explain this:    "Array of UV values for this surface"

       

      And why do I get this error message? What do I have to change?

       

      Thank you very much for your help in advance.