Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Register Log in

Automate titleblock population

Big_Lew

New member
Sheet metal shop. My company has a smart title block that reads many values from pro/report and/or part & assy parameters to populate our title block. One value we enter manually is gage (sheet thickness).


I know that smt_thickness is now a SM part parameter, like to set up relation w/conditional statements to drive correct reporting of gage based on thickness. Something like this:


if smt_thickness=.036 then smt_gage=20


if smt_thickness=.048 then smt_gage=18


Etc.


Anyone know how to make this work?
Edited by: Big_Lew
 

Erik_Gifford

New member
I think this should work. Just add additional statements for additional thickness & gage combinations.
Be sure to end with the same number of endif lines as you have if statements


if smt_thickness==.036
smt_gage=20
else
if smt_thickness==.048
smt_gage=18
endif
endif
 

Big_Lew

New member
Erik_Gifford said:
I think this should work. Just add additional statements for additional thickness & gage combinations.
Be sure to end with the same number of endif lines as you have if statements


if smt_thickness==.036
smt_gage=20
else
if smt_thickness==.048
smt_gage=18
endif
endif

Works like a charm! Thanks, Erik!
 

Big_Lew

New member
Erik_Gifford said:
I think this should work. Just add additional statements for additional thickness & gage combinations.
Be sure to end with the same number of endif lines as you have if statements


if smt_thickness==.036
smt_gage=20
else
if smt_thickness==.048
smt_gage=18
endif
endif

Fine-tuning here... how do I set the resulting value for SMT_GAGE to zero decimal places? It's 16 Gage, not 16.000 Gage.


I tried making the parameter a string, Pro changes it to a real number. Don't care about that, but I'd like to get rid of the 000s...
 

Big_Lew

New member
Big_Lew said:
Erik_Gifford said:
I think this should work. Just add additional statements for additional thickness & gage combinations.
Be sure to end with the same number of endif lines as you have if statements


if smt_thickness==.036
smt_gage=20
else
if smt_thickness==.048
smt_gage=18
endif
endif

Fine-tuning here... how do I set the resulting value for SMT_GAGE to zero decimal places? It's 16 Gage, not 16.000 Gage.


I tried making the parameter a string, Pro changes it to a real number. Don't care about that, but I'd like to get rid of the 000s...

Never mind - figured it out. Here's what I did:


if smt_thickness==.036
smt_gage="20 Gage"
else
if smt_thickness==.048
smt_gage="18 Gage"
else
if smt_thickness==.060
smt_gage="16 Gage"
else
if smt_thickness==.075
smt_gage="14 Gage"
else
if smt_thickness==.105
smt_gage="12 Gage"
else
if smt_thickness==.135
smt_gage="10 Gage"
endif
endif
endif
endif
endif
endif


And made the parameter [SMT_GAGE] a text string - works just fine!
 

Erik_Gifford

New member
What you did is probably the simplest way to accomplish the goal. You get the word "GAGE" for free when you call in the parameter that way and it would more easily allow for 1/2 gage callouts.


If you wanted to keep it as a numeric parameter you could call it into the drawing format (or note) like this:


&smt_gage[.0] GAGE


The number between the [] controls how many decimal places of the called in parameter will actually be displayed.


You may also be able to get there using the floor function in the relations, but I think that would be overkill for what you're trying to do. The gage number isn't something you're then using to do additional calculations so I think what you ended up with is a good solution.
 

Big_Lew

New member
Erik_Gifford said:
What you did is probably the simplest way to accomplish the goal. You get the word "GAGE" for free when you call in the parameter that way and it would more easily allow for 1/2 gage callouts.


If you wanted to keep it as a numeric parameter you could call it into the drawing format (or note) like this:


&smt_gage[.0] GAGE


The number between the [] controls how many decimal places of the called in parameter will actually be displayed.


You may also be able to get there using the floor function in the relations, but I think that would be overkill for what you're trying to do. The gage number isn't something you're then using to do additional calculations so I think what you ended up with is a good solution.

Indeed! Thanks for all the help, Erik. If you don't mind my asking: where did you learn about this stuff? I wnet hunting on the internet and couldn't find out the proper syntax for the relation using the logic operators. Seems relations are pretty well documented if you want to drive dimensional relationships (cut stays in the middle of a part, etc.) but I couldn't find ANYTHING about what I was trying to do.


Care to share you secret?


Thanks again,


Lew Sheen
 

Erik_Gifford

New member
There is a section in the fundamentals guide about relations and parameters that covers it in pretty good detail.


PM me and I'll see if I can send you the relevant pages.
 

Big_Lew

New member
Erik_Gifford said:
There is a section in the fundamentals guide about relations and parameters that covers it in pretty good detail.


PM me and I'll see if I can send you the relevant pages.

Found it. Your help is deeply appreciated, Erik!


Peace,
 

Big_Lew

New member
KO - next question along these lines.


Got the relation working fine for a sheet metal part. Problem is - sometimes the drawing model is an assembly - a sheet metal part w/pem nuts, weld studs, whatever. In an assembly, there is no [SMT_THICKNESS} parameter for me to set.


How do I drill into the assy and capture the gage?


Thanks in advance,


Lew
 

Sponsor

Top