EBDN - Community - Question & Answers

  Tuesday, 23 May 2023
  1 Replies
  610 Visits
0
Votes
Undo
Hello,
i'm looking for a way to change an object with kind "aucObjPipelineSegment" with TypeID "aucUnspecifiedPipelineSegment"
to kind "aucObjDevice" with TypeID "aucProcessFluidValveOthers".

The code

oItem.Attributes.ItemByID(aucAttrTID) = AucType.aucProcessFluidValveOthers
Call oItem.Store

throws an error.
I think because there is no Type "aucProcessFluidValveOthers" in Kind "aucObjPipelineSegment"


How can i change the Object Kind in VBA?
and
How can i simply change the aucUnspecifiedPipelineSegment to aucProcessFluidValveOthers in VBA?


I would prefere not to:
- read all attribute values
- create new object
- write the value of all attributes
- get the linked shape
- get the linked function
- link the funtion to the new object
- delete the old object
- link the new object to the set shape
- and write controlroutines for all of this steps