Universal Robots Forum

Edit existing feature

Hello,

I am trying to build a URCap which changes a feature created in Polyscope by a User, inside an installation node. For this i get the Feature list from:

apiProvider.getInstallationAPI().getFeatureModel().getGeomFeatures(FeaturePlane.class);

and write each feature name (FeaturePlane.getName()) in a list to be used by a dropdown menu.

When a user selects a feature plane i want to change the selected one. I tried doing that using:

featureContributionModel = apiProvider.getInstallationAPI().getFeatureContributionModel();
featureContributionModel.updateFeature(Feature_Key, newPose);

where the Feature_Key variable holds the name i got from the dropdown menu.

This results in an error: FeatureNotFoundException: No Feature found using Ebene_1 as key

if the name is not the correct key, how else can i get this key. There seems to be no funktion for getting a key through a feature contribution model.

is there a better way?

Hello,

it is only possible to update features provided by the URCap itself. See the inserted excerpt from the API Reference docs:

The idKey is the unique name provided by you upon creating the feature. It can be different than the name of the Feature.

If you want to adjust a Feature afterwards using the updateFeature()-Method, you would need to provide the feature yourself.

Alternatively depending at what stage you need to adjust the feature, you can use the found name to update it using script in the robot program itself.

sko

Hi all,

Just to be sure to understand this topic.

There is no way to edit a feature created on polyscope directly on an UR program?

Thank you for your answer,

Romain

Hi rs1,

The ability to edit a feature in Polyscope was added in 5.9.1 for E-series only, but this has to be done on the Installation tab. You can update a Feature in the program when it runs(i.e. shift it up 20mm to offset all the points associated with it), but this does not affect the Installation version of the Feature. There is no way to permanently change the Feature from the program.

1 Like