CATIA Macro - how to retrieve information from a feature in a CATPart
CATIA Macro - how to retrieve information from a feature in a CATPart
(OP)
Hi everyone,
I'm looking to make a macro to retieve information from a CATPArt and export it to Excel.
Basically what the Technological results does but properly.
I need to retrieve from a CATPart the Hole features:
Ref
X origin (according to the CATPart axis system)
Y origin (according to the CATPart axis system)
Y origin (according to the CATPart axis system)
Diameter
depth
if it's counterbored, countersunk or counterdrilled i need to get the 2nd diameter and 2nd depth.
I got the "visual bit" done, ie, the table is set up but i don't know how to read and export the above from any feature in a CATPart.
Any help will be greatly appreciated
I'm looking to make a macro to retieve information from a CATPArt and export it to Excel.
Basically what the Technological results does but properly.
I need to retrieve from a CATPart the Hole features:
Ref
X origin (according to the CATPart axis system)
Y origin (according to the CATPart axis system)
Y origin (according to the CATPart axis system)
Diameter
depth
if it's counterbored, countersunk or counterdrilled i need to get the 2nd diameter and 2nd depth.
I got the "visual bit" done, ie, the table is set up but i don't know how to read and export the above from any feature in a CATPart.
Any help will be greatly appreciated





RE: CATIA Macro - how to retrieve information from a feature in a CATPart
Returns the hole head angle.
This call is valid when the hole type is : Tapered or Counterdrilled or Countersunk.
Returns:
oHeadAngle An Angle object controlling the hole head angle (see Angle for more information)
Example:
The following example returns in holeHeadAngle the head angle of hole firstHole:
Set holeHeadAngle = firstHole.HeadAngle
o Property HeadDepth( ) As Length (Read Only)
Returns the hole head depth.
This call is valid when the hole type is : Counterbored or Counterdrilled or Countersunk.
Returns:
oHeadDepth A Length object controlling the hole head depth (see Length for more information)
Example:
The following example returns in holeHeadDepth the head depth of hole firstHole:
Set holeHeadDepth = firstHole.HeadDepth
o Property HeadDiameter( ) As Length (Read Only)
Returns the hole head diameter.
This call is valid when the hole type is : Counterbored or Counterdrilled.
Returns:
oHeadDiameter A Length object controlling the hole head diameter (see Length for more information)
Example:
The following example returns in holeHeadDiam the head diameter of hole firstHole:
Set holeHeadDiam = firstHole.HeadDiameter