Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Ceiling function of a length

Status
Not open for further replies.

Costin Ruja

Electrical
Oct 19, 2011
87
RO
Good morning !

I am trying to retrieve a length of a spline, which I will be using in a BOM. For production purposes, I need this length to be a multiple of 50mm (49mm->50mm; 51mm->100mm).I am having trouble using the ceil function in Catia V5, mainly to build the 50mm multiple.Right now is working as intended but it only ceils up in 1mm steps. Could you recommend other syntax to do this ?

Best regards,
Costin Ruja
 
Replies continue below

Recommended for you

(1 + int(length/50) ) * 50

Eric N.
indocti discant et ament meminisse periti
 
Thanks !

I'll try this as soon as I have access to my PC.

Best regards,
Costin Ruja
 
Good morning !

I have tried it and works like a charm.

But still I have another question.I have transformed this measure first to a real type by dividing it with 1mm (/1mm) and then applied the formula.

Then again I transformed this real type into a string (ToString(Real).

How do I concatenate "mm" in this string ?

Thanks !

Best regards,
Costin Ruja
 
Add +"mm" to the end of the formula converting the Real to String.

Example: ToString(Real.1 )+"mm"

it will add "mm" to whatever value the String is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top