Solid Edge AddByFilename inserts wrong file

2021-10-06T23:56:16Z
PART/SHEETMETAL

Summary


Details

When defining an API the user runs into a problem with the [AssemblyDocument].Occurrences.AddByFilename() function.

In a certain case it adds an different file into the assembly instead of that specified in the parameter list.
Specifically, if a file with the same name exists in the same folder as the assembly, and the user wants to add a file (same name) located in a different folder, "AddByFilename" takes the wrong one (the one in the assembly folder).




Solution

"AddByFileName" is taking care of search paths, like basic file functions in Solid Edge will do.
 To make "AddByFileName" taking absolute paths, you have to set "LinkMgmt.txt" like this:
 
 ABSOLUTE
 CONTAINER
 RELATIVE
 
 BEGIN SEARCH PATH
 END SEARCH PATH
 
 Do not forget to enter "LinkMgmt.txt" in Solid Edge Options->File Locations.



Hardware/Software Configuration

Platform: AMD64
OS: windows
OS Version: 1064
Product: SOLID_EDGE
Application: AUTOMATION
Function: API_DOCUMENT

Ref: 002-8015632

KB Article ID# PL8015632

Contents

SummaryDetails

Associated Components

PART/SHEETMETAL: FEATURES