Home > Software engineering >  VB in CATIA secondary development, the volume measurement problem
VB in CATIA secondary development, the volume measurement problem

Time:10-03

The grand masters to you all! Consult! Not very grateful!
About CATIA secondary development using VB, I want to by VB programming operating CATIA, shows that cutting body volume of CATIA, center of gravity, such as volume features, at last, through the VB output volume, center of gravity features such as data, part of the code as follows
Dim TheSPAWorkbench As Workbench
Dim MyMeasure As Measurable
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)
Run time said "function or interface markup to restrict or function USES the vb does not support automatic type", not the volume of the entity,
Can you tell me how to solve? Thank you very much! About CATIA SPAworkbench objects and the use of the getmeasurable methods consult ah..

CodePudding user response:

The building Lord, I also want to find out the solution to the problem, don't know if you solved?
  • Related