CATMecModUseItf Interface CATIMmiUseCreateImport
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIMmiUseCreateImport
Interface to create an import.
Role:This class allows to simulate a copy/paste special as result (with link or not) in a easier way than
.
Usage: Set the input object and target, then use the
method. Call
before making another copy.
- Example:
-
CATIMmiUseCreateImport* pCreateImport = NULL;
CATMmiUseServicesFactory::CreateMmiUseCreateImport(pCreateImport);
pCreateImport->SetObject(..);
pCreateImport->SetTarget(...);
pCreateImport->Run(oResult);
Method Index
- o
Check()
- Checks if the copy is possible according to unicity, cyclicity, existing context.
- o
GetCreationStatus()
- Returns creation status.
- o
Reset()
- Resets all parameters and settings.
- o
Run(CATIMmiMechanicalFeature_var&)
- Computes the copy according to specified input.
- o
SetAttributeMode(int)
- Sets the copy mode for attributes when copying without keeping a link.
- o
SetImportApplicativeId(GUID&)
- Sets an applicative identifier on the created Mechanical Import.
- o
SetLinkMode(CATBoolean)
- Sets the link option (with or without link) to override default setting (keep link).
- o
SetObject(CATBaseUnknown_var&)
- Sets the source object or subelement.
- o
SetPLMOccurrences(CATIPLMNavOccurrence_var&,CATIPLMNavOccurrence_var&)
- Selects the PLM occurrences of the source and the target.
- o
SetPaths(CATPathElement*,CATPathElement*)
- Sets the source path and the target path.
- o
SetTarget(CATIMmiMechanicalFeature_var&)
- Sets the target for the copy.
- o
SetTypeOfCreatedSolidSet(CATBoolean)
- Sets the type of created solid set.
- o
SetUnicityCheck()
- Sets the unicity check.
Methods
o Check
-
Checks if the copy is possible according to unicity, cyclicity, existing context.
Role: after setting the source and target, and other options
call this method to know if the copy is possible without actually doing it.
In case of failure, an error may be retrieved with
- Returns:
- S_OK if copy is possible, E_FAIL otherwise
o GetCreationStatus
public virtual GetCreationStatus( | ) |
-
Returns creation status.
Role: after computing the copy, this method will return S_FALSE
if the result already existed and so was not created (if unicity check is activated).
- Returns:
- S_OK if an object was created, S_FALSE if result already existed, E_FAIL otherwise
o Reset
-
Resets all parameters and settings.
Role: mandatory before making a copy again with other parameters.
- Returns:
- S_OK if succeeded, E_FAIL otherwise
o Run
public virtual Run( | | oResult) |
-
Computes the copy according to specified input.
Role: after setting the source and target, and other options
call Run to get the result.
In case of failure, an error may be retrieved with
- Parameters:
-
- oResult
- The result of the copy (if ok).
- Returns:
- S_OK if copy is done, E_FAIL otherwise
o SetAttributeMode
public virtual SetAttributeMode( | | iMode) |
-
Sets the copy mode for attributes when copying without keeping a link.
Role: Allows to specify which attributes are copied. By default, if this method is not called
BRep-attributes and colors on sub-elements are not copied. This method allows to copy color and/or attributes.
This method has no effect on copies with link, for which colors and attributes are copied according to the setting
in 3DShape Infrastructure/3DShape.
- Parameters:
-
- iMode
- 0 : color and BRep-attributes are not copied
1: color is copied, not BRep-attributes
2: BRep-attributes are copied, not color
3: BRep-attributes and colors are copied
- Returns:
- S_OK if mode is accepted, E_FAIL otherwise
o SetImportApplicativeId
public virtual SetImportApplicativeId( | const | iApplicativeId) |
-
Sets an applicative identifier on the created Mechanical Import.
This method must be called before the Run method.
- Parameters:
-
- iApplicativeId
- a unique identifier generated by the application.
(on Windows, use : uuidgen -s)
- Returns:
- S_OK if id was successfully added, E_FAIL otherwise
- See also:
-
o SetLinkMode
public virtual SetLinkMode( | | iMode) |
-
Sets the link option (with or without link) to override default setting (keep link).
- Parameters:
-
- iMode
- TRUE to keep the link, FALSE to break the link
- Returns:
- S_OK if mode is accepted, E_FAIL otherwise
o SetObject
public virtual SetObject( | const | iObjectToCopy) |
-
Sets the source object or subelement.
- Parameters:
-
- iObjectToCopy
- a curve, line, surface, plane, point, parameter, sketch, solid feature set
or a rsur, redge, vertex obtained from selection of a subelement
- Returns:
- S_OK if object is allowed, E_FAIL otherwise
o SetPLMOccurrences
public virtual SetPLMOccurrences( | const | iSourceOcc, |
| const | iTargetOcc) |
-
Selects the PLM occurrences of the source and the target.
Role: for contextual link, both the source and the target occurrences are needed.
Otherwise a rep-rep (non-contextual) link will be created.
Both occurrences may also be specified with the
method.
- Parameters:
-
- iSourceOcc
- the selected occurrence will be used to determine the source context
- iTargetOcc
- the selected occurrence used as a target for the contextual link
- Returns:
- S_OK if occurrences are acceptable, E_FAIL otherwise
o SetPaths
public virtual SetPaths( | | iSource, |
| | iTarget) |
-
Sets the source path and the target path.
Role: this method may be used to replace the 3 previous ones if you prefer
to use path elements. If the path contains occurrences/instances, a contextual link will be created,
otherwise a rep-rep link will be created.
- Parameters:
-
- iSource
- path must contain a part + feature or subelement and may contain products and a rep instance (for context)
- iTarget
- Target path must contain a part, a solid or surfacic feature set and may contain products and a rep instance (for context)
- Returns:
- S_OK if paths are correct, E_FAIL otherwise
o SetTarget
public virtual SetTarget( | const | iTarget) |
-
Sets the target for the copy.
- Parameters:
-
- iTarget
- a mechanical part, solid or surfacic feature set
- Returns:
- S_OK if target is correct, E_FAIL otherwise
o SetTypeOfCreatedSolidSet
public virtual SetTypeOfCreatedSolidSet( | | iIsAnOrderedSet) |
-
Sets the type of created solid set.
Role: Specifies the type of solid set, Solid Body (MechanicalTool startup) or Body
(HybridBody startup), that will be created. This parameter is applicable only in case of solid import.
If the type is not specified, it will be based on "Hybrid Design" setting value.
- Parameters:
-
- iIsAnOrderedSet
- TRUE, for a Body, FALSE, for a Solid Body.
- Returns:
- S_OK if set is accepted, E_FAIL otherwise
o SetUnicityCheck
public virtual SetUnicityCheck( | ) |
-
Sets the unicity check.
Role: if unicity check is set, the copy will not be done if a similar copy already exists
(as in interactive import).
The existing copy will be returned by
.
- Returns:
- S_OK if unicity check is allowed, E_FAIL otherwise
This object is included in the file: CATIMmiUseCreateImport.h
If needed, your Imakefile.mk should include the module: CATMecModUseItf
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.