Quantcast
Channel: PTC Community : Unanswered Discussions - Creo
Viewing all articles
Browse latest Browse all 8685

Need help with Visual Basic routine in Excel to set locations in Creo Drawing

$
0
0

Hi, I've been working through the dark maze of the VBA API, and the documentation for running routines using the Excel VBA is as remarkably sparse.  I am having difficulty trying to determine how to handle a CpfcPoint3D object in an Excel routine.  I have VB examples; but, I'm unable to determine how to structure the same in Excel.  Here is what I have in the Excel routine;

 

        Dim location As CpfcPoint3D

       

        Set location = New CpfcPoint3D

 

        location.Set(0, 10.0)

        location.Set(1, 10.0)

        location.Set(2,0)

 

(Excel objects to the .Set method for a location array.  But, this is the example for a VB routine)

 

This is an example from a VB routine (from the PTC VB API documentation);

 

            Dim pointLoc As IpfcPoint3D  

 

            pointLoc = New CpfcPoint3D

            pointLoc.Set(0, 200.0)

            pointLoc.Set(1, 600.0)

            pointLoc.Set(2, 0.0)

 

Is there any VB API guru that can tell me what I'm doing wrong with my own code?

 

Thx!


Viewing all articles
Browse latest Browse all 8685

Trending Articles