Python get and set generation bug

When using instant generate python code from class diagram when there are get and set operations, it just copies the first row (with the append instead of t_append as defined in class and operation .vm files).
Deleting the first row works in the .vm files but I couldn’t find anywhere what does the append and t_append mean and it would be nice to patch this I think in an update or next version and also to add python 3.7 support.

Hi shalevku,

Your problem may be caused by modified .vm file is not conform to its format.
Unless you want to change generated code, we recommend not to modify .vm files.

However, we do not have enough information to understand what is going on.
We would like to have more information to study your actual case.

  • log files
  • .vm files
  • vpp file

Log file can be obtain via below method.

If possible, please send those files to: support-team@visual-paradigm.com
and include the link to this post in the email.

Best Regards,

Roy.

Hi shalevku,

In latest build of Visual Paradigm 16.1, $args.get(“property”) is no longer required in *.vm files.
Below file contents are our currently bundle version and should already work in your case.

PythonAttribute_Get.vm

$operation.getReference().prepare()##
## ===== Output =====
${baseIndentation}${indentation}${indentation}return self.$operation.getReference().getAttributeName()

PythonAttribute_Set.vm

$operation.getReference().prepare()##
## ===== Output =====
${baseIndentation}${indentation}${indentation}self.$operation.getReference().getAttributeName() = $operation.getReference().getParameterName()

About support Python 3.7 in Instant Generator, we will consider in future release.

Best Regards,

Roy.

It works! I don’t have the latest build because it’s a college build number 16.0, but I edited it manually and it works!