API 설명서 > 3D interface > Object ProIntfimport > Function ProIntfimportModelWithOptionsMdlnameCreate
Function ProIntfimportModelWithOptionsMdlnameCreate
Description
Imports an external file using profile, creating a new model, or a set of new models as required, with a representation as required.
Note: Once a profile is set, it remains valid for the entire session unless it is reset with another profile. Note: In Creo 3 this function does not differ in behavior from superseded ProIntfimportModelWithOptionsCreate. In particular, new_model_name can be only of ProName length. This function is reserved for future use.
Replacement in Object TOOLKIT:
Synopsis
#include <ProIntfimport.h>
ProIntfimportModelWithOptionsMdlnameCreate
(
ProPath import_file
/* (In)
Full path to the file to be imported. Note: When importing CADDS models, ensure that the path is specified in lower case.
*/
ProPath profile
/* (In)
Profile path. May be NULL.
*/
/* (In)
The type of file to be imported.
*/
ProMdlType create_type
/* (In)
The type of model to create. This could be part, assembly, or drawing (for STEP associative drawings). Pass PRO_MDL_UNUSED to let Creo Parametric decide on the model type to be created.
*/
/* (In)
The representation type. Use PRO_IMPORTREP_MASTER to import without special representations applied.
*/
ProMdlName new_model_name
/* (In)
The name of the new top level import model.
*/
/* (In)
Callback to a function that determines how to display and map layers from the imported model. If this is NULL, the default layer handling will take place.
*/
ProAppData application_data
/* (In)
The application data to be passed to the filter function. Can be NULL.
*/
ProMdl* created_model
/* (Out)
The handle to the created model. For an assembly, the handle to the top assembly. If this is NULL the model will be created anyway.
*/
)
Returns
The function successfully created the new import feature.
One or more of the input arguments are invalid.
import_file can't be opened.
Creo Parametric does not support import of the indicated file.
No profile found.
profile is not readable.
This combination of arguments is invalid.
Name length of new model is more than 31 chars.
Missing the required license to perform this import operation.
Already a model with same name exists in the Creo session.
Sample Code References
User Guide References
도움이 되셨나요?