How can i show the "const" keyword

who can tell me ,what can i do when i want to show “const” keyword in my classdiagram,and how can i set the return parameter to const?just
like this

when I write like this: “+operator!=(s : newString &)” the vp-uml will report the error message “Cannot confirm edit because there are syntax errors in text” how can i cancel the syntax check??

so,these are my questions: show “const” keyword in my classdiagram; set the return parameter to const; cancel the syntax check.

thanks very much

Hi Weir75034,

Thanks for your post. For your questions:

  1. Please select Tools > Configure Programming Language and choose C++, then you can check “const” in Attribute Code Details or Operation Code Details (in Specification dialog of attribute/operation)

  2. When you open the Specification dialog of parameter, you can see the checkbox “const” there.

  3. The syntax check cannot be disabled, you got the syntax error message since you tried to enter invalid characters (e.g. “!”). After you correct your input to be valid, you will not get the error message.

If there is further inquiry, please do not hesitate to ask.

Best regards,
Lilian Wong

hi,LilianWong .

thank you very much. but I think you may have some mistakes to my means.

1,I know i can checked the “const” option for parameters but I want show “const” keyword in the diagram .

2,I want let the functions return type is consted,like this:

const int func(const int a) const;

I know parameter a and the funtion func can be consted by choose checkbox “const”. but the func’s return type how to become const. I’m not find where can be setted.

I’m chinese, i’m so sorry for my poor english.thanks for you help.I hope you can give me more infomation for VP-UML.

Hi Weir75034,

Sorry for my misunderstanding. For the issues you mentioned:

  1. Showing “const” on diagram is not standard in UML .
  2. You can select “const” in Operation Code Details tab inside operation’s Specification dialog, and select “const” in Parameter Code Details tab inside parameter’s Specification dialog. Then you will get the code generated as you want (see image). Hope this helps.

Best regards,
Lilian Wong


Hi fellows,

it seems, this option disappeared in later versions.

How can I achieve this option in the current version (Version 8.3 Build sp2_20120310)?


Please make sure you have select C++ as the project programming language (under Tools Menu). The const option will show up once you specified this.

Best regards,
Rain Wong