Import and Export Access Configuration (PLMImportExportPnOAndAttributeValuations)

An opening ID is an entry point used to customize business logic. Import and Export Access Configuration business logic defines which users can access file-based design import, downard compatibility, and 3D XML with authoring import and export commands and batches, and import or export the selected objects with them.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when:

  • Users export content:
    • To CATIA files with the Export command or the DownwardCompatibility batch.
    • To 3D XML in the 3D XML with authoring format with the Export command, Export 3D XML batch, or Global Export from Collaborative Space batch.
  • Users import :
    • CATIA files with the Import command or the FBDI batch.
    • 3D XML with authoring files with the Import command, or Import 3D XML batch.

This opening ID is used to customize the users that can access these commands and batches, and the objects that can be exported and imported.

Definition Description
PLM Opening ID PLMImportExportPnOAndAttributeValuations
Customization intent Validation
Execution context Client / Server

Input Objects

Input objects must be of the following types:

  • ThisObject
  • Parameters corresponds to the context object.
  • Validation

Context Object Parameters

Parameter Name Type Read or Write Comments
UserName String Read The name of the logged in user.
OrganisationName String Read The name of the organization the user belongs to.
ProjectName String Read The name of the collaborative space the user belongs to.
RoleName String Read The access role assigned to the user.
ImportExportFormat String Read The format of import or export (FBDI or 3DXML Authoring Import for import, CATIA File or 3DXML Authoring Export for export).
FileNames List Read List of all the file names to be imported.
ObjectList List Read List of all the objects to be exported.

This list contains the following attributes for each object: name, type, revision, and maturity state.

Sample

Let UserName(String)
Let OrganisationName(String)
Let ProjectName(String)
Let RoleName(String)
Let bAccessAllowed(Boolean)
Let ImportExportFormat(String)

UserName = Parameters->GetAttributeString("UserName")
OrganisationName = Parameters->GetAttributeString("OrganisationName")
ProjectName = Parameters->GetAttributeString("ProjectName")
RoleName = Parameters->GetAttributeString("RoleName")
ImportExportFormat = Parameters->GetAttributeString("ImportExportFormat")

if ( UserName == "xxx")
{
Parameters->SetAttributeBoolean("AccessAllowed",FALSE)
}

else
{
Parameters->SetAttributeBoolean("AccessAllowed",TRUE)
}


if(ImportExportFormat == "FBDI")
{
	Let ListOfFileNames(List)
	Set ListOfFileNames = Parameters->GetAttributeObject("FileNames")
	
	Let SizeOfFileNameList(Integer)
	Set SizeOfFileNameList=ListOfFileNames.Size()
	
	Trace(1,"xxx ImportExportFormat: #",ImportExportFormat)
	Trace(1,"xxx SizeOfFileNameList: #",SizeOfFileNameList)
	if(SizeOfFileNameList > 0)
	{
		Let i(Integer)
		Set i=1
		Let FileName(String)
		for i while i <= SizeOfFileNameList
		{
			Set FileName = ListOfFileNames[i]
			
			if ((UserName == "xxx") and (FileName == "D:\SKN14\CATIA_DATA\19xNew\Product1.CATProduct"))
			{
				bAccessAllowed = FALSE
				break
			}
		}
	
		if (bAccessAllowed == FALSE)
		{
			Parameters->SetAttributeBoolean("AccessAllowed", FALSE)
		}
	
		else 
		{
			Parameters->SetAttributeBoolean("AccessAllowed", TRUE)
		}
	}

}


if(ImportExportFormat == "CATIA File")
{
	Let ListOfObjects(List)
	Let ListOfAttributes(List)
	Let ListSize(Integer)
	Let ListOfListSize(Integer)
	Let i(Integer)
	Let TypeOfObject(String)
	Let NameOfObject(String)
	Let RevisionOfObject(String)
	Let MaturityOfObject(String)
	
	ListOfObjects = Parameters->GetAttributeObject("ObjectList")
	ListOfListSize = ListOfObjects.Size()
	
	Set i = 1
	
	Trace(1,"xxx ImportExportFormat: #",ImportExportFormat)
	Trace(1,"xxx ListOfListSize: #",ListOfListSize)
	if (ListOfListSize > 0)
	{
		for i while i <= ListOfListSize
		{
			Set bAccessAllowed = FALSE
			Set ListOfAttributes = ListOfObjects.GetItem(i)
			ListSize = ListOfAttributes.Size()
			if (ListSize >0)
			{
				NameOfObject= ListOfAttributes[1]
				TypeOfObject= ListOfAttributes[2] 
				RevisionOfObject = ListOfAttributes[3]
				MaturityOfObject = ListOfAttributes[4]
			}
				
			if ((RevisionOfObject == "A") and (UserName == "SKN14"))
			{
				bAccessAllowed = FALSE
				break
			}	
		}
		
		if (bAccessAllowed == FALSE)
		{
		Parameters->SetAttributeBoolean("AccessAllowed", FALSE)
		}
		
		else 
		{
		Parameters->SetAttributeBoolean("AccessAllowed", TRUE)
		}
	}
}
if((ImportExportFormat == "3DXML Authoring Import") OR (ImportExportFormat == "3DXML Authoring Export"))
{

	Let ListOfObjects(List)
	Let ListOfAttributes(List)
	Let ListSize(Integer)
	Let ListOfListSize(Integer)
	Let i(Integer)
	Let TypeOfObject(String)
	Let NameOfObject(String)
	Let RevisionOfObject(String)
	Let MaturityOfObject(String)
	
	ListOfObjects = Parameters->GetAttributeObject("ObjectList")
	ListOfListSize = ListOfObjects.Size()
	Set i = 1
	if (ListOfListSize > 0)
	{
		for i while i <= ListOfListSize
		{
			Set bAccessAllowed = TRUE
			Set ListOfAttributes = ListOfObjects.GetItem(i)
			ListSize = ListOfAttributes.Size()
			if (ListSize >0)
			{
				NameOfObject= ListOfAttributes[1]
				TypeOfObject= ListOfAttributes[2] 
				RevisionOfObject = ListOfAttributes[3]
				MaturityOfObject = ListOfAttributes[4]
			}
				
			if ((RevisionOfObject == "A") and (UserName == "skn14"))
			{
				bAccessAllowed = FALSE
				break
			}	
		}
		
		if (bAccessAllowed == FALSE)
		{
		Parameters->SetAttributeBoolean("AccessAllowed", FALSE)
		}
		
		else 
		{
		Parameters->SetAttributeBoolean("AccessAllowed", TRUE)
		}
	}
}

Important: If you do not specify any value for AccessAllowed, it is set to FALSE.