C# Parameters

C# Parameters

dlegan
Participant Participant
1,424 Views
3 Replies
Message 1 of 4

C# Parameters

dlegan
Participant
Participant

Hello all. I have been looking to attach inventor parameters with C# code. Has anyone done anything like this yet? I am hoping to use a C# form with text box vales for an attached inventor model.

 

Thanks, David Legan

1,425 Views
3 Replies
Replies (3)
Message 2 of 4

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,


The usage of C# and VB.NET on Parameter is not much different. Did you meet some problem, or just wanted to have some code to achieve a specific requirement. In any case, please elaborate thus it will helpful for the peers jump into. 

 

In addition, there are some samples of VB.NET in API help reference.

0 Likes
Message 3 of 4

dlegan
Participant
Participant

Hello and thank you for replying. We have been using an inventor model with a vba application. I was wanting to use a C# format with input boxes for the parameter values and then update the model.

 

For example: say parameter is par_Width

 

Input field is txt_Width

 

parwidth = value of txt_width.text

 

then update and save as needed

 

If I have the code to attach a parameter this way then I can attach the rest.

 

Thank you for your help.

 

David L.

 

0 Likes
Message 4 of 4

xiaodong_liang
Autodesk Support
Autodesk Support

frankly, this is very generic. If you just take a look at the basic of Paramter, you will not be much difficult to write something out. I would suggest you firstly have a look at our video toturial at

 

http://download.autodesk.com/media/adn/Autodesk_Inventor_API_Module2_Common_Document_Functionality_1...

 

where there is the introduction on how to use Paramter. In addition, the zip has one C# project which shows how to access , modify, add Parameter. I think it will be a good start to get familar with the topic.

 

If you meet specific problem, please post it.