EKL - Report2D - OnOff Sheet Connector

Report  the list of connected sheets 

  • The purpose of this function is to have a functionality to be able to report on\off-sheet connectors
  • So, this EKL method takes a PLM Instance (The routable) as input and returns all the properties of all Sheets connectors connected to this PLM instance.
  • CATGetSchSheetConnectorInformations (iRoutableInstance, oListOfSheetCntrInfos)
//LogicalOccurrence - string
Let RoutableInstance(PLMCoreInstance)
Let DisplayMessage(String)
Set RoutableInstance = ThisObject.Instance
Let ListOfSheetCntrInfos(List)
GetSchSheetConnectorInformations(RoutableInstance, ListOfSheetCntrInfos)

Let j = 1
Let jsize = 0
jsize = ListOfSheetCntrInfos->Size()
Let ListofRelatedName(List)

for j while j<=jsize
{                               
                Let SheetCntrInfos(Feature)
                set SheetCntrInfos = ListOfSheetCntrInfos.GetItem(j)
                if(SheetCntrInfos <> NULL)
                {
                                //Retrieve the information about each sheet connector
                                DisplayMessage = " Input Routable  : " + RoutableInstance.GetAttributeString("PLM_ExternalID") + " | "                           
                                DisplayMessage = DisplayMessage + "Active Sheet Connector Name  = " + SheetCntrInfos.GetAttributeString("SheetConnector_Object_Name")+ " | "  
                                Let RelatedOffSheetName(String)
                                Let i = 1
                                Set ListofRelatedName =  SheetCntrInfos.GetAttributeObject("SheetConnector_RelatedOffSheetObject_Name")
                                for i while i<=ListofRelatedName->Size()
                                {   
                                RelatedOffSheetName = ListofRelatedName[i]
                                if (RelatedOffSheetName <> "")
                                DisplayMessage = DisplayMessage + " | "  + "Related OffSheet Name=  " + RelatedOffSheetName+ " | "
                                }
                                Let RelatedRoutableInstance(PLMCoreInstance)
                                Set RelatedRoutableInstance = SheetCntrInfos.GetAttributeObject("SheetConnector_RelatedRoutable")
                                if (RelatedRoutableInstance <> NULL)
                                DisplayMessage = DisplayMessage  + "Related Routable Instance = "+ RelatedRoutableInstance.GetAttributeString("PLM_ExternalID")+ " | "
                                Let RelatedComponentInstance(PLMCoreInstance)
                                Set RelatedComponentInstance = SheetCntrInfos.GetAttributeObject("SheetConnector_RelatedComponent")
                                if (RelatedComponentInstance <> NULL)
                                DisplayMessage = DisplayMessage + "Related Component Instance = "+ RelatedComponentInstance.GetAttributeString("PLM_ExternalID")+ " | "​​​​
                                Let SheetInst(DIFSheetInstance)
                                Set SheetInst = SheetCntrInfos.GetAttributeObject("SheetConnector_SheetInstance")
                                if (SheetInst <> NULL)
                                DisplayMessage = DisplayMessage + " | "  + "Sheet Instance = " + SheetInst.GetAttributeString("PLM_ExternalID")                       
                                Let Sheet(DIFSheet)
                                Set Sheet = SheetCntrInfos.GetAttributeObject("SheetConnector_SheetReference")
                                if (Sheet <> NULL)
                                DisplayMessage = DisplayMessage + " | "  + "Sheet Reference = " + Sheet.Name+ " | "
                                Let ViewInstance(DIFViewInstance)
                                Set ViewInstance = SheetCntrInfos.GetAttributeObject("SheetConnector_ViewInstance")
                                DisplayMessage = DisplayMessage + "View Instance= " + ViewInstance.GetAttributeString("PLM_ExternalID")+ " | "
                                Let ViewRef(DIFView)
                                Set ViewRef = SheetCntrInfos.GetAttributeObject("SheetConnector_ViewReference")
                                DisplayMessage = DisplayMessage + "View Reference= " + ViewRef.Name+ " | "                        
                                Let PositionX(Real)
                                Set PositionX = SheetCntrInfos.GetAttributeReal("SheetConnector_PositionX_InSheet")
                                DisplayMessage = DisplayMessage + " | "+ "PositionX= " + PositionX+ " | "
                                Let PositionY(Real)
                                Set PositionY = SheetCntrInfos.GetAttributeReal("SheetConnector_PositionY_InSheet")
                                DisplayMessage = DisplayMessage+ "PositionY=  " + PositionY+ " | "
                                Let FramePositionX(String)
                                Set FramePositionX = SheetCntrInfos.GetAttributeString("SheetConnector_FramePositionX")
                                DisplayMessage = DisplayMessage + "FramePositionX=  " + FramePositionX+ " | "

                                Let FramePositionY(String)
                                Set FramePositionY = SheetCntrInfos.GetAttributeString("SheetConnector_FramePositionY")
                                DisplayMessage = DisplayMessage + "FramePositionY=  " + FramePositionY+ " | "
                                Message(DisplayMessage)
                }
}