Home > Software engineering >  Using VB to a problem of the secondary development of CATIA
Using VB to a problem of the secondary development of CATIA

Time:10-05

Dim Coordinates1 (2)
The Set TheSPAWorkbench=CATIA. The ActiveDocument. GetWorkbench (" SPAWorkbench ")
The Set reference1=oPart. FindObjectByName (" 1 ")
The Set measureObj=TheSPAWorkbench. GetMeasurable (reference1)
MeasureObj. GetPoint Coordinates1 run said "function or interface markup to restrict or function USES the vb does not support automatic type", click on the error in determining return procedures, including GetPoint to blue, is wrong here, but how to change? Consult ~ ~ ~ ~ ~ ~ ~ ~

CodePudding user response:

How no one came to ah ~ ~ ~

CodePudding user response:

I use the following statement to obtain the coordinates of a point

TheMeasurable. GetPoint

Always appear
Function or interface markup to limit, or function using Visual Basic does not support the automatic type

CodePudding user response:

How no one answer???

CodePudding user response:

Honey, you did this problem solve? To solve the

CodePudding user response:

But as you said that, it should be GetPoint function does not provide the corresponding interface, I also met this problem

CodePudding user response:

MeasureObj is defined as the object is ok ~! ~

CodePudding user response:

The original poster hello! Ask you similar questions. I think through VB CATIA cutting the volume of the body, the center of gravity, such as volume features,
Dim TheSPAWorkbench As Workbench
Dim MyMeasure As Measure
Dim VOL As Double
Dim COG (2) As a Double
Dim the reference As the reference
The Set TheSPAWorkbench=CATIA. The ActiveDocument. GetWorkbench (" SPAWorkbench ")
Part1. InWorkObject=Body1
The reference=Part1. CreateReferenceFromObject (split1)
The Set MyMeasure=TheSPAWorkbench. GetMeasurable (reference)
VOL.=MyMeasure Volume
MyMeasure. GetCOG COG (2)
Running time is also say "function or interface markup to restrict or function USES the vb does not support automatic type" is how to solve? Thank you very much!

CodePudding user response:

Dim Coordinates1 (2)
MeasureObj. GetPoint Coordinates1

Coordinates1 is a variant types of arrays, and have a look. GetPoint need what types of parameters,

CodePudding user response:

Will use OleView. Exe to check the COM interface information?

CodePudding user response:

Cannot determine the type of change to the object directly or not directly determine type
  • Related