Anuncios

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

Anonymous
694 Vistas, 4 Respuestas

Feature creation in API

Hi,

 

Very new to using the API in FeatureCAM. I tried creating Features with dimensions such as Pocket, Hole and they work fine. I'm figuring out how to create Features using curves. The API help mentions that curves must be defined as Variant. What does that mean and how do I define the curves? 

 

 

Here's a very simple code that I tired, but it doesn't work for AddPocket. If I give the exact name of the curve in " " - it works.

For e.g. doc.Features.AddPocket("curve12', 6) -- This works. 

But the curve names will differ and also there can be multiple curves in a project. So how do I define it in the macro?

 

 

Sub Main

	Dim doc As FMDocument
	Set doc = Application.ActiveDocument

	doc.Features.AddRectPocket(100, 50, 5)

	doc.Features.AddPocket("???", 6)

End Sub