On Visual C# Express, I get the following error with the code below:
'Type 'myComponent.SettingsComponent' already defines a member called 'SolveInstance' with the same parameter types'
But I only used SolveInstance
there. What am I doing wrong and how would I be able to solve this on my own next time?
namespace myComponent
{
public class SettingsComponent : GH_Component
{
protected override void SolveInstance(IGH_DataAccess DA)
{
}
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
{
}
protected override void SolveInstance(IGH_DataAccess DA)
{
if (m_settings == null)
{
AddRuntimeMessage(warning, "You must declare some valid settings");
return;
}
DA.SetData(0, m_settings);
}
}
}
It looks like you have two instances of
protected override void SolveInstance(IGH_DataAccess DA)
in your example class, one with an empty body and one with code.
Try to find all occurences of SolveInstance in the project. You will possibly find another definition of this method in a .designer.cs file. They are autogenerated and sometimes they cause duplicity problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With