Parameter controlled visibility

Parameter controlled visibility

baldur
Observer Observer
785 Views
4 Replies
Message 1 of 5

Parameter controlled visibility

baldur
Observer
Observer

I have a Excel worksheet with a lot of parametrers that I use to control extrusions, sketches and so forth.

 

I have one thing that I cant find a way to automate using parameters. 

 

I have thres options for a beam. It can either be a UPN, he100b or IPN. What beam it should be depends on a calculation performed in Excel.

 

One solutions would be to insert all beams and set visibility to false for two of the beams, leaving only the rigtht one visilible.

 

But actually I dont like the solutions, and worse I even dont know how to set visibility for a part or extrusion using parameter equations.

 

Does anyone have a good idea how I can achieve what I want?

 

Best Regard,

 

Baldur Smiley Wink

0 Likes
786 Views
4 Replies
Replies (4)
Message 2 of 5

perrysc
Enthusiast
Enthusiast

Why not just create a column in the excel file called "Beam Type" with a value of 1,2, or 3. Then just insert the beam into the assembly using illogic similar to this.

 

Select Case GoExcel.CellValue("filename.xls","Sheet1","A2")
Case 1
	'Insert UPN
Case 2
	'Insert he100b
Case 3
	'Insert IPN
End Select
0 Likes
Message 3 of 5

baldur
Observer
Observer

Actually I have never used iLogic, so I am not aware of its potential.

 

I think it a litte "overkill" to read from Exce twice - both during the linking in the paramters (I use a lot of other paramters from the sheet than just this beam type) and through iLogic.

 

Would it be possible to read parameters from iLogic and how is it possible to change the "visibility" of a ipt in my assembly? 

 

Thanks

 

 

 

0 Likes
Message 4 of 5

jtylerbc
Mentor
Mentor

I'm not aware of any way to do what you're trying to achieve without either using iLogic or restructuring your model into an iAssembly.  iAssembly would allow you to do what you're trying to accomplish without writing any code, but might conflict with some of what you are trying to do with making your model Excel-driven.

 

There are actually multiple ways you can do something like this through iLogic.

 


baldur wrote:

 

I think it a litte "overkill" to read from Exce twice - both during the linking in the paramters (I use a lot of other paramters from the sheet than just this beam type) and through iLogic.

 


I think I would agree.  A cleaner option would be to use something with logic similar to what @perrysc posted, but which uses a parameter already being read from Excel (ex. a parameter named BEAMTYPE) as your condition instead of reading from Excel again.

 


@Anonymous wrote:

 

 

Would it be possible to read parameters from iLogic and how is it possible to change the "visibility" of a ipt in my assembly? 

 


I believe controlling Visibility through iLogic is possible, but probably not what you are going to want.  Visibility has no effect on the BOM/Parts list, or on the physical properties.  You may not care about being able to see the weight of your assembly, but if you do, controlling this via Visibility would result in the weight including the weight of all three beam options at the same time, which is obviously incorrect.

 

Instead, I think you would want to use iLogic code to set the part as being inactive instead.  This state, which really only exists through iLogic, goes further than Visibility and takes the part out of the BOM and physical properties.  In that technique, each of your three "Cases" would set one beam as active and the other two as inactive.

0 Likes
Message 5 of 5

kelly.young
Autodesk Support
Autodesk Support

Greetings @baldur I see that you are a new poster to the Inventor Forum.
Welcome to the Autodesk Community!

 

If you're not familiar with iLogic and you are driving your model with Excel, I think you are highly capable of implementing it into your design practice.

 

Check out some of these examples and see if any of them are doing the same type of actions you would want.

 

Collection of iLogic models for beginners

 

Then open up the file, inspect the iLogic Rules and copy the code and amend to your needs.

 

You can visit the Inventor Customization Forum for iLogic questions and great information about the best way to get setup.

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

0 Likes