Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error in C#: The name 'Parameter' does not exist in the current context"

1 REPLY 1
Reply
Message 1 of 2
hithere8
1228 Views, 1 Reply

Error in C#: The name 'Parameter' does not exist in the current context"

I was following the AU iLogic sample (AU Box & AU Shutter Assembly) to migrate some vb.net code to C# as below, however I got the error "The name 'Parameter' does not exist in the current context" as commented in the following code:

 

using Autodesk.iLogic.Interfaces;
using TempPlate.Utilities;

namespace TempWork
{
    public partial class TempPlate : Form
    {
        public IParamDynamic Parameter = null ;
        public IMultiValueParam MultiValue = null;
        public ILowLevelSupport iLogicVb = null;

        public TempPlate()
        {
            InitializeComponent();
        }
        
        private void TempPlate_Load(object sender, EventArgs e)
        {
            Parameter("Capacity") = 100;  //Error: The name 'Parameter' does not exist in the current context"
            
            tbxCapacity.Text = Parameter("Capacity");         
        }        
    }
}

 Can somebody help me out? Thanks a lot!

1 REPLY 1
Message 2 of 2
hithere8
in reply to: hithere8

Having done some research, and found my mistake to share as below:

 

Parameter("Capacity") = 100;

Should be corrected as below:

 

Parameter["Capacity"] = 100;

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report