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!

Relations.CreateFormula failure

Status
Not open for further replies.

lpp

Computer
Jun 27, 2004
2
We recently went from v5r11sp4 to v5r13sp2 and the hybridbodies named "Open_body.1" were changed to "Geometrical Set.1". Now the Releations.CreateFormula function fails to give the correct value and I suspect it has to do with the blank character in the name. If you rename it in the CATIA file and the VB source module without the space it works "GeometricalSet.1"

This fails, gives length = zero:

Set myLenRel = myPart.Relations.CreateFormula("LenForm",
"",myLength,"length(Geometrical Set.1\MySpline)")

Any ideas how to get the length of a spline when there is a space somewhere in the name? Thanks!

 
Replies continue below

Recommended for you

Try using a split command on the name looking for a space.
Then append the two strings back together and you will get a new name without the space.
 
or try wrapping the name with the single quotes ``
(Note, not '')
 
Not clear to me how to respond to the people who responded to my question. Anyway, thank you. I had already tried many combinations of single and double quotes to no avail, but yo and behold the tick marks worked! Again, thanks for the responding to my original question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor