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, downward compatibility, 3DXML with authoring, STEP files, and X-PDM 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 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 3DXML in the 3DXML with authoring format with the Export command, Export 3DXML batch, or Global Export from Collaborative Space batch
    • to STEP files with the Export command, or the DataExchangePLMBatch
    • to X-PDM with the Export command, or the XPDMImportExportBatch
    • to 3DXML for review.
  • users import:
    • CATIA files with the Import command, or the FBDI batch
    • 3DXML with authoring files with the Import command, or Import 3DXML batch
    • STEP files with the Import command, or the DataExchangePLMBatch
    • X-PDM with the XPDMImportExportBatch.

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

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 Possible values are:
  • For import: 3DXML Authoring Import, 3DXML Authoring Import AsRefER, FBDI, STEP, or XPDM Import
  • For export: 3DXML Authoring Export, CATIA File, STEP, or XPDM Export
  • For migration with 3DXML: 3DXML Transfer Site Mastership
  • For conversion of 3DEXPERIENCE content with CAD format to 3DEXPERIENCE content: CAD Transition
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.

Note: For 3DXML Review Export, 3DXML Authoring Export, and CATIA File operations, the business logic is invoked twice during the process:
  • First invocation: All Part and Object (PnO) information along with the import/export type is provided, but the object list is empty.
  • Second invocation: The full object list is passed.

You must ensure that the business logic handles both invocations appropriately.

Sample for FBDI, CATIA File, 3DXML Authoring Import, 3DXML Authoring Export, and CAD Transition

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:\xxx\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 == "xxx"))
			{
				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 == "xxx"))
			{
				bAccessAllowed = FALSE
				break
			}	
		}
		
		if (bAccessAllowed == FALSE)
		{
		Parameters->SetAttributeBoolean("AccessAllowed", FALSE)
		}
		
		else 
		{
		Parameters->SetAttributeBoolean("AccessAllowed", TRUE)
		}
	}
}
If (ImportExportFormat == "3DXML Authoring Import AsRefER") 
{  
	if (UserName == "MyUser")
		{
		Parameters->SetAttributeBoolean("AccessAllowed",TRUE)
		}
}	
If((ImportExportFormat == "CAD Transition") 
{
	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 == "ala8"))
			{
				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.

Sample for XPDM

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 == "XPDM Import") OR (ImportExportFormat == "XPDM 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 == "xxx"))
			{
				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.