API programming, adding STL as stock

API programming, adding STL as stock

Anonymous
Not applicable
473 Views
2 Replies
Message 1 of 3

API programming, adding STL as stock

Anonymous
Not applicable

Hi,

 

We can use STL file as stock in FeatureCAM

sc.jpg

How to do that  using API?

I know how to import STL into document, how to reference it as a model (using it name), but I have no idea how to set this file as a stock.

 

Do you have any suggestions?

 

Thanks in advance

Regards,

Janusz

0 Likes
474 Views
2 Replies
Replies (2)
Message 2 of 3

nagamanickam_dharmalingam
Autodesk Support
Autodesk Support

@Anonymous

 

As you are visiting as a new member,Welcome to the Autodesk community!

 

Here i have explained in Video about creating the stock model using the imported STL file, and also referencing the same stock model to toolpath creation, The first toolpath explaining about without stock model reference,the second toolpath is explaining about with stock model ,and also giving the reference to the next rest machining toolpath,

Hope it will help you to clarify your query,

 

If i have misunderstood your query kindly add more information ,

 

kindly accept if my answer solved your query,or reply with additional details if the problem exist.

 

 

Best regards,

Nagamanickam dharmalingam





Best regards
Nagamanickam Dharmalingam
0 Likes
Message 3 of 3

spencer.hardcastle
Autodesk
Autodesk

Hi @Anonymous,

 

Thanks for posting!

 

If you are looking for a way to set the stock using an stl model, this can be done using the code below.

 

    Dim doc As FMDocument
    Set doc = Application.ActiveDocument

    Dim stock As FMStock
    Set stock = doc.Stock

    Dim mystl As FMModel
    Set mystl = doc.Models.Item("primitive_from_points")

    stock.SetStockSolid(mystl)

 

If this answers your query, please accept this post as the solution. If not, please let me know.

 


Spencer Hardcastle
Manager of Customer Advocacy - Autodesk Fusion
0 Likes