Rule/Add-in to automatically slice graphics on sketch creation/edit

Rule/Add-in to automatically slice graphics on sketch creation/edit

Anonymous
Not applicable
1,214 Views
4 Replies
Message 1 of 5

Rule/Add-in to automatically slice graphics on sketch creation/edit

Anonymous
Not applicable

Pretty much the title.

 

I want to create an iLogic rule or vb.net add-in that will automatically run the command "Slice Graphics" when a sketch in the part/assm environment is created. 

 

I've got about 50hrs experience with programming, but I need assistance with where to start. 

 

Any pointers would be appreciated!

0 Likes
1,215 Views
4 Replies
Replies (4)
Message 2 of 5

Sergio.D.Suárez
Mentor
Mentor

Hello, try to execute these two lines as an ilogic rule.

 

ThisApplication.CommandManager.ControlDefinitions.Item("PartNewSketchCmd").Execute2(True) 
ThisApplication.CommandManager.ControlDefinitions.Item("SketchSliceGraphicsCmd").Execute2(True) 

 I hope this helps. regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 3 of 5

Anonymous
Not applicable

@Sergio.D.Suárez 

 

Almost perfect!

 

Since I've never done it before and don't know what it's called, I don't get meaningful results when I try to search. Is it possible to have:

ThisApplication.CommandManager.ControlDefinitions.Item("SketchSliceGraphicsCmd")

run anytime a sketch is edited or created new? I see some kind of for/while loop that waits for NewSketch or EditSketch, then runs and restarts the rule. Could you provide any insight to how to get an iLogic rule to wait for a command to be run?

0 Likes
Message 4 of 5

Anonymous
Not applicable

It looks like the solution will involve writing an Addin. As I'm a complete noob in that arena, it will be a few days/weeks before I have it finished. I will update here with the code once completed.

0 Likes
Message 5 of 5

Maxim-CADman77
Advisor
Advisor

Just in case: recently I've added the function desired in 1.0.2 version of my tiny little Add-In that automates activation of some popular 3D-model view modes.
I suggest to try if it suit your needs - SmartProjectEm.msi

Please vote for Inventor-Idea Text Search within Option Names

0 Likes