- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
I´m newbie with Powermill API and i want to ask some help.
I have a little C# form menu with two buttons (For the moment) the first button works fine, but the second not work and get me an error.
Some body can help me please?
I attacht 2 images about the error i say.
Many thanks in advance.
kindly regards.
Erik
//====================
//POWERMILL AUTOMATION
//====================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Delcam.ProductInterface.PowerMILL;
using Delcam.ProductInterface;
using Delcam.Geometry;
namespace CS_FORM_TEST1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
PMAutomation powerMILL = new PMAutomation(Delcam.ProductInterface.InstanceReuse.UseExistingInstance);
PMProject pSession = powerMILL.ActiveProject;
}
private void button2_Click(object sender, EventArgs e)
{
Delcam.FileSystem.File importFile = new Delcam.FileSystem.File(@"C:\Users\*****\Desktop\HOLES.dgk");
PMModel myModel = pSession.Models.CreateModel(importFile);
}
}
}
Solved! Go to Solution.
