Reported Visitor Message by Rajesh

 
Parents
  • [url=https://www.avevaworldforum.com/member.php?41466-Rajesh]Rajesh[/url] has reported a visitor message.

    Reason:
    Hi thanks for your reply.
    I have below query
    Is that it will do rename olet 7 as Branche+l005,
    And i want to skip only that olets where name contain mp and MT

    Profile: [url=https://www.avevaworldforum.com/member.php?12003-rhel&tab=visitor_messaging&vmid=3209#vmessage3209]rhel[/url][url=https://www.avevaworldforum.com/member.php?12003-rhel&tab=visitor_messaging&vmid=3209#vmessage3209][/url]
    Assigned Moderators: TBack, JCont20, rgardner, mno

    Posted by: [url=https://www.avevaworldforum.com/member.php?12003-rhel]rhel[/url]
    Original Content:
    @ Rajesh, see the macro code to rename as requested:

    -- Get all OLET within the Current Element (CE)
    var !allOlets collect all (OLET) for CE
    -- Loop through all collected OLETS
    do !i indices !allOlets
       !oletRefe = !allOlets[!i].dbref()
       !branName = !oletRefe.owner.name
       -- Skip for Already named OLET
       skip if (!oletRefe.isnamed)
       -- Get the name sequence number
       do !n
           if (!n.lt(10)) then
               !seqNo = '00' & !n.string()
           elseif (!n.lt(100)) then
               !seqNo = '0' & !n.string()
           else
               !seqNo = !n.string()
           endif
           !oletName = !branName & '-' & 'L' & !seqNo
           -- Check name if does already exists
           var !isNameExists exists $!
Reply
  • [url=https://www.avevaworldforum.com/member.php?41466-Rajesh]Rajesh[/url] has reported a visitor message.

    Reason:
    Hi thanks for your reply.
    I have below query
    Is that it will do rename olet 7 as Branche+l005,
    And i want to skip only that olets where name contain mp and MT

    Profile: [url=https://www.avevaworldforum.com/member.php?12003-rhel&tab=visitor_messaging&vmid=3209#vmessage3209]rhel[/url][url=https://www.avevaworldforum.com/member.php?12003-rhel&tab=visitor_messaging&vmid=3209#vmessage3209][/url]
    Assigned Moderators: TBack, JCont20, rgardner, mno

    Posted by: [url=https://www.avevaworldforum.com/member.php?12003-rhel]rhel[/url]
    Original Content:
    @ Rajesh, see the macro code to rename as requested:

    -- Get all OLET within the Current Element (CE)
    var !allOlets collect all (OLET) for CE
    -- Loop through all collected OLETS
    do !i indices !allOlets
       !oletRefe = !allOlets[!i].dbref()
       !branName = !oletRefe.owner.name
       -- Skip for Already named OLET
       skip if (!oletRefe.isnamed)
       -- Get the name sequence number
       do !n
           if (!n.lt(10)) then
               !seqNo = '00' & !n.string()
           elseif (!n.lt(100)) then
               !seqNo = '0' & !n.string()
           else
               !seqNo = !n.string()
           endif
           !oletName = !branName & '-' & 'L' & !seqNo
           -- Check name if does already exists
           var !isNameExists exists $!
Children
No Data