(API) How to create code design groups?

(API) How to create code design groups?

seifehab_bl4
Explorer Explorer
1,914 Views
4 Replies
Message 1 of 5

(API) How to create code design groups?

seifehab_bl4
Explorer
Explorer

I'm looking to create a script in C# and want to be able to create code design groups and specify which bar IDs go into each group, so that I can do a code group design later. I found an excel macro script on this forum that can edit existing code groups, but I want to be able to create new ones, and would prefer if it was in C# if possible, please. I tried searching through the documentation but couldn't find anything about code groups. 

 

@Rafal.Gaweda would appreciate any help.

0 Likes
Accepted solutions (1)
1,915 Views
4 Replies
Replies (4)
Message 2 of 5

Rafal.Gaweda
Autodesk Support
Autodesk Support
Message 3 of 5

seifehab_bl4
Explorer
Explorer

Hi @Rafal.Gaweda 

 

Thank you for sharing this. I looked through the code there and identified the function I've attached as an image. From looking at the RobotOM assembly file, I was able to convert it to C# like in the other attached image. I'm not getting any errors, but the new group doesn't show up in the robot model. Would you happen to know why please? I have no experience writing VBA and am unfamiliar with it.

 

 

0 Likes
Message 4 of 5

seifehab_bl4
Explorer
Explorer
Accepted solution

Managed to figure it out in the end. Attached the finished code for reference. Forgot to initialise codeGroupNum in the screenshot I sent.

0 Likes
Message 5 of 5

Stephane.kapetanovic
Mentor
Mentor

hi @bhuttomehran33 

...

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature