A Bit (or a Lot) of Help Please

A Bit (or a Lot) of Help Please

simon4D86F
Enthusiast Enthusiast
1,740 Views
25 Replies
Message 1 of 26

A Bit (or a Lot) of Help Please

simon4D86F
Enthusiast
Enthusiast

Hi everyone,

 

I have asked a couple of "Experts the same question, but no joy so I am throwing this out to the community for any help I can get. 

 

I hope you can help me out here, I have been searching the forums for an answer to a problem that I have created and want to solve, but I think that this means going into the API which is another minefield. 

 

I have found some possible partial solutions, but they do not really work for what I am trying to achieve and being new to ilogic, find myself going around in circles. So if you can help me, my problem is below...

 

I want to set up a rule that will "Inspect" each part within an assembly, check to see if it has a cut out, hole, slot, bevel etc and then make sure that the corresponding description is in the Custom iProperties and if not, put it there.

 

I also need this to run on any assembly, no assemblies with an assembly included and never more than 15 parts within that assembly and all of the parts are a minimum of 15mm thick

 

Lets say I have an assembly, and within that assembly I have....

1 part has a Radius on a corner, that would be placed into a custom iproperty "Desc2" as "Rout/"

1 part has a Chamfer or extrusion on a corner, that would be placed into a custom iproperty "Desc2" as " "Bevel/"

1 part has a Hole up to 10mm in the part, that would be placed into a custom iproperty "Desc2" as "Drill/"

1 part has a Hole larger than 10mm in the part, that would be placed into a custom iproperty "Desc2" as "Rout/"

1 part has a iFeature or Punch Tool in the part, that would be placed into a custom iproperty "Desc2" as "Slot/"

1 part has a Extruded cutout in the part, that would be placed into a custom iproperty "Desc2" as "Rout/"

1 part has a nothing (other that width thickness and depth), that would be leave the "Desc2" in iProperties as blank

 

As I have said, I have searched the forums and cannot find anything that really helps other than sending me around in circles, or it may simply be not asking the right question,

 

I dont know if I am explaining myself very well, so please let me know if not.

 

If you could help, I would be most grateful.

 

Oh, one other thing, I work away from home so only get to do this at the weekends so any replies from me will be late in most cases, so apologies in advance.

 

Many thanks in advance for your time  and effort.

 

Simon

0 Likes
1,741 Views
25 Replies
Replies (25)
Message 21 of 26

clutsa
Collaborator
Collaborator

Right now that will only work in that one part... I made it that way on purpose hoping/thinking it would be something you could open and run to get an idea of if it would work. So for the moment give up on the assembly or any other part. I'm not sure why rule0 would be failing. 

Lets try this...

1. Open the VBA editor.

2. Go to Module1

3. Put your courser on "UserForm1.Show

4. Press "F5" on your keyboard

If that doesn't work ...

5. Double click "UserForm1" under the "Forms" folder (you should see the form to the right, not the code)

6. Press "F5" on the keyboard

 

Click on the five option boxes and then on the SendString. Check the iProperties to see that it updated with the combo you made.

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 22 of 26

Anonymous
Not applicable

Hi Clutsa,

 

That works a treat, I have also tried to add some buttons and the code for the text, and that works a treat too.

 

0 Likes
Message 23 of 26

clutsa
Collaborator
Collaborator

OK, great! So you're happy with the concept? Next step is to get this working on all your parts/assemblies. I'll see if I can get you some steps to make this work on a larger scale. 

Will you be the only one using this or will there be other users that need this to work on their computers too?

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 24 of 26

Anonymous
Not applicable
This will need to be used by others unfortunately, so the easier the
better, I dont mean that in a derogatory way, its just that there knowledge
of Inventor is limited due to lack of proper training etc and they know
less about iLogic and code than I do.
0 Likes
Message 25 of 26

clutsa
Collaborator
Collaborator

There are cleaner/better ways to do this but this should be simple...

0.0 Get the form changed just how you want it.

0.5 You will want to rename your form. (red arrows change form name, blue changes caption on the form)

RenameForm.PNG 

1.0 Right click on the form and export it to a network location.

rightClickExport.PNG

2.0 Do all above steps for your Module.

3.0 Have other users open the VBA editor.

4.0 Right click "ApplicationProject" and select "Import"

5.0 Find files on network drive and import.

6.0 Save  the Default.ivb file (save button in VBA Editor)

 

Pro: This is fairly straight forward to do

Can: If you ever need to make changes to the code every user will have to Remove the form and re-import it.

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 26 of 26

clutsa
Collaborator
Collaborator

Once they get that done they can add a custom button.

Right click on the ribbon and select "Customize User Commands"

In the drop down select "Macros". 

Find your macro (probably the only one in there) and use the double arrow button to send it to whatever ribbon pane is selected at the top.

SetCustomButton.PNGSetCustomButton2.PNG

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes