Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

how to suppress/resume a part using pro program

Status
Not open for further replies.

sateesh s

Mechanical
Sep 14, 2017
1
[tt]thread554-177087

Hi i have a query regarding pro program, i am new to this as well, please help me out.
Simplified question is: how to suppress a part or parts in a assembly using pro program?

Question can be elaborated as my need:
Please can suggest how to create parameters, and how to write a pro program to suppress a part.
Please go through complete below example how am i expecting.

Example: Consider XXX.asm is my master assembly. XXX-A is sub-assembly & is having n number of parts, i need to write a program such that among n number of parts, only 3 sheetmetal parts should be controlled.(SHT1, SHT2, SHT3)

That is, if WIDTH of my master assembly is (WIDTH<=1000MM & WIDTH>=850MM), SHT1.PRT Should resume. SHT2 and SHT3 should get suppress.
If WIDTH of my master assembly is greater than 1000mm(WIDTH>=1001 & WIDTH<=1600), SHT2.PRT & SHT3.PRT should get resume and SHT1.PRT should get suppress. (i dont want to use pattern or family table as SHT1/2/3 are of different sizes)

can Width be defined in increment or decrement value of 25mm? how the program should be?

Below are the internal component id:
ADD PART SHT1
INTERNAL COMPONENT ID 48
END ADD

ADD PART SHT2
INTERNAL COMPONENT ID 49
END ADD

ADD PART SHT3
INTERNAL COMPONENT ID 52
END ADD

I TRIED THIS: (BUT GETTING ERROR)

IF WIDTH=1200
errorLogical expression expected.
ADD SUPPRESSED PART SHT2.PRT
errorExtra symbols found - ignored.
INTERNAL COMPONENT ID 49
errorExtra symbols found - ignored.
ENDIF

Heard can suppress feature but how to do for part,

THANK YOU
 
Replies continue below

Recommended for you

The single "=" is an assignment function - it sets WIDTH to the value of 1200. You need to use the logical expression "==" which is two consecutive (no spaces) equal signs to tell it you are testing for equality.

In the program you only use the suffix for the file type when you use ADD COMPONENT. ADD PART always adds the same type as is already installed.

The error after INTERNAL COMPONENT ID 49 is because that is the label for the component that wasn't added because you included the ".PRT" suffix, so the add failed and therefore there is nothing to put the label on, so the LABEL function failed.

Fix the first two errors and the third error will go away.
 
the bad thing about pro/program is that it's difficult to create a custom design once you have the logic there.
(include SHT2 even if width == 1200 for a custom design).

also, you need to place endif AFTER the END ADD command.
 
Logic is logic. If it needs to be different just type something different. It's only difficult when the logic isn't actually thought out and when there is inexperience in creating the commands.

There is a flag in the Save-As dialog box that allows stripping of the special functions and leaves the base Program structure. So a one-off can be as custom as one likes without changing a line of Program.

More toughly - write a program that writes other programs in a different language than the initial program. I've done C->postscript; C is algebraic and postscript is postfix. Gaaah. Still not really tough after the initial shock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor