Copy of aspect via Afw.Interop.ABBObjectAutomationInterfaces results in aspect with same (Guid-)ID as the source
SourceAspect As Afw.Interop.ABBObjectAutomationInterfaces.ABBAspect
to a target object and target aspect
TargetCursor As Afw.Interop.ABBObjectAutomationInterfaces.ABBStructureCursor
TargetAspect As Afw.Interop.ABBObjectAutomationInterfaces.ABBAspect
TargetAspect = SourceAspect.Copy(TargetCursor.Object)
TargetAspect.Name = [New name]
the copy works fine, but the target aspect has the same ID as the source aspect (TargetAspect.ID = SourceAspect.ID - both read-only).
This is of course a big problem.
I simply do not understand why the interface doesn't provide a new ID to the copied aspect.
It doesn't make any sense to me, that there can be several unique aspects with the same ID (Guid).
If you make the copy by hand (right-click Copy and right-click Paste) in a plant explorer, 800xA automatically provides a new unique ID to the new aspect.
What should I do to get around this problem - getting a unique ID ?
(previously posted 5 weeks ago as https://forum-controlsystems.abb.com/20223418/Copy-of-aspect-via-Afw-Interop-AB
BObjectAutomationInterfaces-results-in-aspect-with-same-GuidID-as-the-source with no answer - repeated to you because a customer is waiting for the application)
This question has not yet been answered.