ilogic - rule - compile errors

ilogic - rule - compile errors

Anonymous
Not applicable
896 Views
5 Replies
Message 1 of 6

ilogic - rule - compile errors

Anonymous
Not applicable

Hi Guys,

 

First off. I'm an experienced Inventor user but very much in the traditional sense. Have never seen a snippet before or even attempted to use much of ilogic.

I have have literally searched the forums high and low before I posted this question. I have have tried a multitude of things based on other questions/discussions I have found but still cannot get the tiny piece of code to work. :(. Its 12:30 a.m. and I have decided to trow the towel in.

 

I am trying to suppress an extrude feature in an iPart in an iAssembly with a yes/no text parameter. Would love some guidance here. See attached images for overview of situation.

 

I would also love where I can learn to get a grip of the coding using the snippets etc.. Do a few of the tutorials but I feel like its not detailed enough for me to get it.

 

Much appreciated in advance.Inventor_2020-05-08_00-23-22.pngInventor_2020-05-08_00-31-30.pngInventor_2020-05-08_00-31-59.png 

0 Likes
Accepted solutions (1)
897 Views
5 Replies
Replies (5)
Message 2 of 6

FINET_Laurent
Advisor
Advisor

You are missing an argument in the brackets.

It needs the part name and the feature name of that specific part.

("Name of the part in the assembly" , "Name of the feature")

 

Here is an example of mine :

If Upstream_lower_U_sheet_welding_holes = True Then 
	Feature.IsActive("Upstream lower U sheet 1:1", "Réseau rectangulaire1") = True
	
Else If Upstream_lower_U_sheet_welding_holes = False Then 
	Feature.IsActive("Upstream lower U sheet 1:1", "Réseau rectangulaire1") = False
	
End If 	

  Hope this helps. If it did please mark this as solution.

 

Best regards, FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 6

Anonymous
Not applicable

Hi!

 

Cheers for the reply. The good news is I'm not getting any more errors. The bad news is that it's not doing anything when I change from yes to no or vice versa.

 

See attached. I recorded the various screens to show everything. Hope it helps a little.

 

 

 

 

0 Likes
Message 4 of 6

FINET_Laurent
Advisor
Advisor
Accepted solution

Instinctively i'd say your part name and feature name are messed up. They don't match in both statements..

Also i think you are missing the " " for the yes and no.

If the  part name is Panel01-01:1 and the specific feature of the part is  Wall01Cut01

I'd try :

 

If Cutout01required = "Yes" Then 
Feature.IsActive("Panel01-01:1", "Wall01Cut01") = True

Else if Cutout01required = "No" Then 
Feature.IsActive("Panel01-01:1", "Wall01Cut01") = False

End if 

 

 

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 5 of 6

Anonymous
Not applicable

Thanks! I had an error in feature name:) and the "" done it.

 

Do have any tips on where I can learn to get a better handle on writing out the pieces of code? I mean there is the help manual etc. but anything that you know of might break it down it a bit easier?

 

Cheers! Have a good weekend.

Message 6 of 6

FINET_Laurent
Advisor
Advisor

You are welcome ! 🙂

 

To be honnest I didn't open the manual once. I found most of the answers on this forum. There are also few videos on youtube explaning bits of codes here and there. I'd say practise and research is the best way to go (in my opinion).

 

Some one might have a better answer to this question.. ^^'

 

Best regards,

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes