Cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting/Renaming Aspects/Variables While Asset Is Created

Experimenter
Experimenter

Hello all,

 

I began typing this question and realized it would be too confusing without an example.

 

I have an Aspect, call it X.

This aspect has three variables, var1, var2, var3.

I have a Type, call it Y which has the aspect X.

I have an Asset, call it Z which is of type Y.

 

Is there any way to delete/rename the aspect X from the type Y while the asset Z exists

 

Is there any way to delete/rename the variables var1, var2, var3 inside of the aspect X while the asset Z exists?

 

I am aware you can add aspects to the type Y while the asset Z exists and

that you can add variables to the aspect X while the asset Z exists.

 

Is there any chance that the data structure is more flexible than it appears to be or if there are plans to make the structure more flexibles in the future?

 

Any help on this subject would be greatly appreciated.

 

Thanks,

Jake

3 REPLIES 3

Re: Deleting/Renaming Aspects/Variables While Asset Is Created

Pioneer
Pioneer
is there any update on deleting variable?

Re: Deleting/Renaming Aspects/Variables While Asset Is Created

Siemens Genius Siemens Genius
Siemens Genius

I've looked at this question because it also interests me, and have run a couple of practical tests using our asset management command line tools, as follows:

I created an aspect type X with 3 variables var1, var2, var3.
Ok.

I created an asset type Y with aspect type X.
Ok.

I created an asset Z with asset type Y.
Ok.

Now to the cases that the original poster asked:

I tried to delete aspect X from asset type Y.
Failed with error code 400 and error message 'All previously created aspects must be kept when updating an asset type'.

I tried to rename aspect X in asset type Y to A.
Failed with error code 400 and error message 'All previously created aspects must be kept when updating an asset type'.

I tried to delete var3 from aspect type X.
Failed with error code 400 and error message 'Renaming or deleting of aspect type variables are not supported'.

I tried to rename var3 in aspect type X to var4.
Failed with error code 400 and error message 'Renaming or deleting of aspect type variables are not supported'.

For completeness I then went a step further by deleting the dependent resources and retrying the above operations, as follows:

I deleted asset Z.

I again tried to delete aspect X from asset type Y.
Failed with error code 400 and error message 'All previously created aspects must be kept when updating an asset type'.

I then tried to rename aspect X in asset type Y to A.
Failed with error code 400 and error message 'All previously created aspects must be kept when updating an asset type'.

I then deleted asset type Y.

I again tried to delete var3 from aspect type X.
Failed with error code 400 and error message 'Renaming or deleting of aspect type variables are not supported'.

I then tried to rename var3 in aspect type X to var4.
Failed with error code 400 and error message 'Renaming or deleting of aspect type variables are not supported'.

Thus the answer to all the questions of the original poster is: No, you can't rename or delete an aspect variable in an aspect type, or an aspect in an asset type, regardless of whether that aspect type or asset type is in use in another resource.

The consequence of this is that you need to be very, very careful when creating MindSphere aspect types and asset types as later changes are only possible to a very limited extent, such as changing the description of the aspect type/asset type. You may end up having a large number of assets by the time you realise you need a differently structured aspect type or asset type, and will then have to delete all those assets, the asset type and aspect type, then re-create them the way you actually need them. This is very tedious, and is one of the reasons we created our 'mtools' suite of asset management command line tools which we can use in asset creation scripts.

Re: Deleting/Renaming Aspects/Variables While Asset Is Created

Siemens Creator Siemens Creator
Siemens Creator

Yes we need a flexible model here for Asset Management.

I need to delete the Assets and then recreate everything again with the required changes. 

Even if the script is developed for doing this the problem is the asset IDS needs to be changed in the applications where they are used in Mindpsphere APIs.

Also the data which was uploaded for the old/previous asset is gone and needs to upload data again (in case I just delete the extra aspect from my Assettype but the main aspect remain as it is)