Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

(Robot API) Add In does not display designed controls on custom form

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
maciek.szczudlo
637 Views, 2 Replies

(Robot API) Add In does not display designed controls on custom form

I am creating Robot Add-in to automate some tasks. Everything went fine until I started implementing Windows Form control.

I started Form, picked some controls, and although in designer it looks nice:

 

 

after add-in installing and launching, Robot displays empty form, without controls.

 

addin_final.png

 

Anobody got some ideas ?

 

I attached my sample project with IRobotAddIn implementation in CyborgExtension.cs file, some sample Robot project and simple iteration through slabs.

 

Thanks in advance 

2 REPLIES 2
Message 2 of 3

You just need initialize components in your overloaded constructor of UcsFixForm class.

 

public UcsFixForm(RobotApplication robot)
{
    _robot = robot;
    InitializeComponent();  <--- this was missing
}

 

I'm also wondering why you disable user control in Robot

     robot.UserControl = false;

before you run your form.

It may lead to unexpected behavior I'm afraid.

What do you want to achieve?

 

Regards,

Marek Wiecek

 

Message 3 of 3

Ah, of course! - such a silly mistake!
Now it works fine!
Looking for solution I also tested robot.UserControl - this is code remnant to remove.

 

Thanks so much, Marek.

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

Post to forums  

Autodesk Design & Make Report