Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Feature name limitations (<X>, #?, #length...)

JosefBurjetaJosefBurjeta Member Posts: 28 PRO
Hi, 

I've searched the forums, but haven't found an answer. I also contacted Support, but still nothing... so I'm creating this topic to see if I'm not alone...
(Kissin' Dynamite - You're Not Alone)

... and also if anyone knows the answer.


Is there some limitation of characters usage in the name of features? 


I found there is, you can't use <X>, where X is any character you want and <, > are in this order (not the other way around >X<). It looks like a HTML language code and Onshape will tell you that with error message: "Name cannot contain HTML."


Also there's no use for hashtags, which you could probably use as awesome clarity in the naming conventions. 

For example:
Variable #radius, type length, value 5 mm.
Fillet with value of #radius and the name shall be "Fillet - R#radius", which will then show "Fillet - R5 mm" and this will be change automatically with variable value.

But we can't use hashtags, if you type any digit or alphabetical character, it will turn the name into "?", eg. name "Extrude #height" will turn into "Extrude ?". Interestingly typing "#!" stays as typed in.


Since the names are somehow propagated in FS (I believe in selections boxes), there is surely some limitation what characters can be used and which make problems. And I haven't found out which are those problematic ones. Is there some library, which states them? Do you know some? 

I haven't tried to type in all of the special characters, but probably it seems like the only way to find out the answer.


Thanks for any response

PS: Those "Part Number/Name" FS from Neil and Evan are cool, but I would like to change name of features as well. :) 


Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 195 PRO
    edited May 13
    Not sure about the other special characters but # can be used if you do ##radius for example.

    Edit:
    If you just want the formatting, you could use unicode characters instead, such as:
    ‹X

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • JosefBurjetaJosefBurjeta Member Posts: 28 PRO
    Hi Caden, thanks for your inputs. Using extra hashtag seems to work, well at least you will see anything after that and won't get question mark. But still, that's no use.


    In this case, I have custom feature with several settings which I used multiple times for testing. I needed to see exact parameters I have chosen in the name so I don't need to reopen it and check for them, I can then simply un/suppress such feature.

    In the parameters there are MIN and MAX values which were set... so I had feature name like "test feature <4mm, >10mm, x2". I resolved the issue with moving the "<4mm" and ">10mm" the other way around creating >X< instead of <X>

    Inserting unicode characters can be seen as a solution, thanks for that, but I probably won't have time to search for them, copy them or make a list of various useful ones, which could be typed in with Alt+numbers.
Sign In or Register to comment.