Continue to Site

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.

multiple parameters in symbols variable t

joefrench

New member
Is it possible to have multiple parameters in a symol instance (same variable text)?


I have a note which is set as follows:&PLATE_THICKNESS X &PLATE_WIDTH X &PLATE_LENGTH (all relations)


I then have a parameter named callout that is set to read the note.


I then have a symbol that I use in drawings that is set to read the parametercallout along with many other parameters. however, the symbol shows nothing for the callout parameter. This also happens if I try to tag text on to the end of a variable text with parameters. Why? Any ideas of how to combine things like this?





Thanks
 
Thank you Vlad.


This worked great. The only problem is it removes the decimal places. I'm assuming this is because "itos" is integer to string? In which case, it will convert the integers and integers to strings? Is there a "double" to string or something to that effect? I would like to show something like: .750 x 9.500 x 11.500


Thanks


Joe
 
I didn't find a way of doing that.


I usually put the imperial material fractional like 3/4"x9-1/2"x11-1/2" because ussually the material will not be with that many tolerances when you purchase it (3 decimal places like yours is a lot). (I wish I could post the way to translate decimals to fractions using relationsbut that is kind of propertary where I work)


And for metric use I put the material with no decimal places like 5mm x 20mm x 35mm. Because you will not find material like bar rectangle 5.5mm x 20.3mm as an example.


If you really need to show that many decimals you can create a table with 3 columns, put in each column &thickness , &width and &length and blank the cell border lines between them, and the final result will show a single cell with the material size.



Edited by: vlad1979
 
This is a way to get an ITOS output to display decimals, i use it to convert mm to inch decimal, x is the mm value:

x_INCH=x/25.4
DEC_PLACES=2
RND=5/10^(DEC_PLACES)
x_DEC=itos((x_INCH-floor(x_INCH))*10^(DEC_PLACES))
x_WHOLE=itos(floor(x_INCH))
TITLE_1="PLATE "+x_WHOLE+"."+x_DEC+"in LONG"

I have used RND to round up the last decimal place, what it is doing is using the "floor" function to truncate the number, then subtract the truncated number from the original to get the decimal part. This is then multiplied by 10e2 to give the right number for 2 decimal places

In the text output (TITLE_1) you simply
smiley5.gif
add the truncated text part to the decimal text part and job done

Have fun

Brenyw
 

Sponsor

Articles From 3DCAD World

Back
Top