Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

hx
Advocate
343 Vistas, 1 Respuesta

Using FeatureCAM.FMHole to setting the diameter and Depth

I am writting an exe file to get the all hole features, and change it's diameter and depth if there are not my want.

 

the code i wrote:

 

Dim docHole As FeatureCAM.FMHole = docFeatrue
If Not (docHole.Diameter = feature.Diameter) Then
  docHole.SetAttribute( attr_id, sub_id, feature.Diameter)
End If

 

here is the enumerate attr_id and sub_id.

can somebody give me help, and write an example for me?

spencer.hardcastle
en respuesta a: hx

Hi @hx,

 

To change the diameter and depth of a hole, you can use the following code...

 

Dim hole as FMHole

 

hole.Update3(,Diameter,Depth)

 

You do not need to use an AttributeID for modifying these parameters, just replace Diameter and Depth in the above code.

 

The FeatureCAM API help is a great resource when writing macros. It can be found by selecting the ? icon in the top right of the FeatureCAM window, and selecting FeatureCAM API Help.

 

Hope this helps,

Spencer


Spencer Hardcastle
Manager of Customer Advocacy - Autodesk Fusion