Autodesk / Autodesk/PowerShapeAndPowerMillAPI

sNCProgram.Toolpaths.Count returns zero

Open
#34 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
52
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Hi Luke,

Hope you can help me with this. I've run below code and not sure why the toolpaths count I'm getting is 0. There are definitely toolpaths inside the NC program. Please note this is old 2017 dated project, which I want to modify and re-post. I have just checked there is no issue with a project created in 2021 version of PowerMill. I even created new NC program, added toolpaths to this freshly created NC program - same issue - Toolpath count=0

Please approach me and I can send you the whole affected project, for you to investigate this.

I've updated project to 1.1.53 in NuGet but still the same issue.

**_powerMILL = New PMAutomation(Autodesk.ProductInterface.InstanceReuse.UseExistingInstance)
Dim pSession As PMProject = powerMILL.ActiveProject

For Each sNCProgram As PMNCProgram In pSession.NCPrograms
If sNCProgram.IsActive Then
MsgBox("Toolpaths count =" & sNCProgram.Toolpaths.Count)
End If
Next_**

![image](https://user-images.githubusercontent.com/13207483/108239423-ccef9b80-7141-11eb-919f-bb05d5babb8e.png)
![image](https://user-images.githubusercontent.com/13207483/108239634-03c5b180-7142-11eb-9cde-12d3dbedcd09.png)

Hope you can help me with this.

Cheers
Arthur

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.