Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to turn on and off parts in assembly that you don't need

  • Thread starter Thread starter MB2011SD
  • Start date Start date
M

MB2011SD

Guest
Edit: The title should read: How to Program it to HIDE or SUPPRESS parts you don't need by programming it in the design program.

Hello, I have a question that might have been asked before. I have read pro-programs where they use the word "execute assembly". I am trying to program my assembly so that certain parts will turn on or be hidden based on the answers I get from user inputs when they first open my assembly.

I made an assembly with has parts on it that could be mounted on the left or right side. What I am trying to do is ask the user who opens my assembly this question: "do you want the cylinder mounted on the right or left side". What I have is the assembly drawn with the cylinder/and brackets on both sides.

What I have been doing is when I create a unique assembly, I just hide the parts I don't need, and leave the ones I do need.

But to me, I should be able to go into the program and write a simple routine to get input and then add or hide a part that is shown.

I already have plenty of example programs where you ask the user for inputs. I know how to get the input with IF, ENDIF statements.

I just wish I could say: IF user says "LEFT" SIDE, then hide "BRKT_ACT_OPP.PRT". Where I specifically state the name of the part and say hide it. Or suppress it.

If anyone has any advice I would be glad to hear it. The example programs I have statements like "execute assembly" in it, and I have the feeling that is the direction I should be headed, but I am trying to do something a little simpler than that if possible.

Thanks in advance.
 
First, you need to have the advanced assembly license. Then, install the parts as required and enter Pro/Program. Find the part you want to show when the input is LEFT (Add component BRKT_ACT_OPP.PRT) and put the following before it

IF input == "LEFT"

put ENDIF after the block
 

Part and Inventory Search

Sponsor

Back
Top