Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

timelineGroups problem

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
brad.bylls
195 Views, 6 Replies

timelineGroups problem

I am working on naming my timelineGroups.

This code works in one of my scripts:

moldBaseTimelineGroups = design.timeline.timelineGroups
moldBaseIndex = newOcc.timelineObject.index
chamferInputIndex = newChamferFeats.timelineObject.index
moldBaseTimelineGroup = moldBaseTimelineGroups.add(moldBaseIndex, chamferInputIndex)
moldBaseTimelineGroup.name = _inputSelectBaseSize + ' Mold Base'
This works and puts puts the name '1012 Mold Base' at the bottom of the group in the timeline.
This code however just puts Group# at the bottom of the group.
fhscsTimelineGroups = design.timeline.timelineGroups
fhscsIndex = newOcc.timelineObject.index
hexExtIndex = hexExt.timelineObject.index
fhscsTimelineGroup = fhscsTimelineGroups.add(fhscsIndex, hexExtIndex)
fhscsTimelineGroup.name = strResult + ' x ' + strBoltBodyLength + ' FHSCS'
strResult = '1/4-20'
strBoltBodyLength = '1.0'
So the name should be '1/4-20 x 1.0 FHSCS'  (I've verified the variables during debugging)
However, what I get is 'Group 6' as the timlineGroup name at the bottom of the group in the timeline.
I tried:
fhscsBolt = strResult + ' x ' + strBoltBodyLength + ' FHSCS'
fhscsTimelineGroup.name = fhscsBolt
I verified that fhscsBolt did equal '1/4-20 x 1.0 FHSCS'
But fhscsTimelineGroup.name still comes out 'Group 6'
Not much to go on, but any ideas would help.
Thank you.
Brad Bylls
6 REPLIES 6
Message 2 of 7
nnikbin
in reply to: brad.bylls

A timelineGroup name can not contain characters "/" and "=", because when you directly rename a timeline group in user interface, if it contains these characters you get the following error message:

 

28.png

Message 3 of 7
nnikbin
in reply to: nnikbin

You can use unicode character U+2215 (Division Slash) = "∕" instead of "/"

Message 4 of 7
brad.bylls
in reply to: nnikbin

Thanks.

I'll give it a try.

Brad Bylls
Message 5 of 7
brad.bylls
in reply to: nnikbin

What would be the syntax?

Don't find anything.

Brad Bylls
Message 6 of 7
navid.nikbin
in reply to: brad.bylls

Just use '\u2215' instead of '/'. You can also use replace or other string functions:

strResult = strResult.replace('/', '\u2215')

Message 7 of 7
nnikbin
in reply to: navid.nikbin

It was me in previous reply. I used my company user account by mistake.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report