All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

ManufacturingInterfaces Interface CATIMfgResourceQuery

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATIMfgResourceQuery
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIMfgResourceQuery

Interface dedicated to resource query management.
Role: This interface offers services to manage the queries for resource objects (i.e tools, machines, ...)
Implementing this interface will allow customer to connect its own database for managing resources into CATIA V5 Manufacturing products.
Common attributes are declared in CATMfgResourceConstant.
Common attributes are declared in CATMfgToolConstant.
Common attributes are declared in CATMfgInsertConstant.
Common attributes are declared in CATMfgMachineConstant.


Method Index


o AddConstraint(CATUnicodeString&,int&,CATUnicodeString&,CATIMfgResourceQuery::MfgResourceQueryType)
Defines one constraint for query on string attribute.
o AddConstraint(CATUnicodeString&,int&,double&,CATUnicodeString&,CATIMfgResourceQuery::MfgResourceQueryType)
Defines one constraint for query on double attribute.
o AddConstraint(CATUnicodeString&,int&,int&,CATIMfgResourceQuery::MfgResourceQueryType)
Defines one constraint for query on integer attribute.
o AddConstraints(CATUnicodeString&,CATUnicodeString&,int&,CATListOfInt&,CATListOfInt&,CATListOfDouble&,CATListOfCATUnicodeString&,CATListOfInt&,CATIMfgResourceQuery::MfgResourceQueryType)
Defines several constraints for query on a specific attribute.
o AddDiameterBetweenConstraint(double&,double&,CATUnicodeString&,CATIMfgResourceQuery::MfgResourceQueryType)
Defines one simple constraint for query on "Diameter" attribute.
o AddNameLikeConstraint(CATUnicodeString&,CATIMfgResourceQuery::MfgResourceQueryType)
Defines one simple constraint for query on "Name" attribute.
o AddSubComponentTypeConstraint(CATIMfgResourceQuery::MfgResourceQueryType,CATUnicodeString&)
Defines the type of resource on which we want to add constraints.
o Execute()
Executes the defined query.
o GetComponentNameAndIndex(int&,CATUnicodeString&,int&,CATIMfgResourceQuery::MfgResourceQueryType)
Retrieves the Tool or Insert name defined on the tool assembly, and its index.
o GetCorrectors(int&,CATListOfCATUnicodeString&,CATListOfInt&,CATListOfInt&,CATListOfInt&,CATListOfDouble&,CATIMfgResourceQuery::MfgResourceQueryType)
Retrieves the correctors information.
o GetDescription(int&,CATListOfCATUnicodeString&,CATListOfInt&,CATListOfInt&,CATListOfInt&,CATListOfDouble&,CATListOfCATUnicodeString&,CATIMfgResourceQuery::MfgResourceQueryType)
Retrieves the values of an object responding to the defined query.
o GetNamesToDisplay(CATListOfCATUnicodeString&)
Retrieves the names of query location to display in the selection panels.
o GetRepresentation(int&,CATIDocId*&,CATIMfgResourceQuery::MfgResourceQueryType)
Retrieves the representation of an object responding to the defined query.
o GetRepresentation(int&,CATUnicodeString&,CATIMfgResourceQuery::MfgResourceQueryType)
Retrieves the representation of an object responding to the defined query.
o GetResultSize(int&,CATIMfgResourceQuery::MfgResourceQueryType)
Retrieves the result size of the defined query.
o InitConnection()
Initializes the connection to the repository for query execution.
o Initialize(CATUnicodeString&,CATUnicodeString&)
Initializes the query on the resource object.
o InstantiateResourceInDocument(int&,CATBaseUnknown_var&,CATIMfgResourceQuery::MfgResourceQueryType,CATDocument*)
Instanciate the resource in the document.
o ResetConnection()
Resets the connection to the repository for query execution.

Enumerated Type Index


o MfgResourceQueryType
Defines the type of resource on which we want to add constraints.

Methods


o AddConstraint
public virtual HRESULT AddConstraint( const CATUnicodeString& iAttribute,
const int& iOperator,
const CATUnicodeString& iValue,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Defines one constraint for query on string attribute. For example, searches for object whose "Name" attribute equals "TOTO".
Parameters:
iAttribute
The attribute name
iOperator
The operator
Legal values:
  • 0:Equal
  • 10:Like
iValue
The string value
o AddConstraint
public virtual HRESULT AddConstraint( const CATUnicodeString& iAttribute,
const int& iOperator,
const double& iValue,
const CATUnicodeString& iUnit,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Defines one constraint for query on double attribute. For example, searches for object whose attribute "Diameter" is greater than 0.0 mm.
Parameters:
iAttribute
The attribute name
iOperator
The operator
Legal values:
  • 0:Equal
  • 1:Not Equal
  • 2:Less
  • 3:Greater
  • 4:Less or Equal
  • 5:Greater Or Equal
  • 6:Not Less
  • 7:Not Greater
iValue
The double value
iUnit
The unit name
o AddConstraint
public virtual HRESULT AddConstraint( const CATUnicodeString& iAttribute,
const int& iOperator,
const int& iValue,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Defines one constraint for query on integer attribute. For example, searches for object whose attribute "Number" is greater than 0.
Parameters:
iAttribute
The attribute name
iOperator
The operator
Legal values:
  • 0:Equal
  • 1:Not Equal
  • 2:Less
  • 3:Greater
  • 4:Less or Equal
  • 5:Greater Or Equal
  • 6:Not Less
  • 7:Not Greater
iIntValue
The integer value
o AddConstraints
public virtual HRESULT AddConstraints( const CATUnicodeString& iAttribute,
const CATUnicodeString& iUnit,
const int& iTypeValue,
const CATListOfInt& iOperators,
const CATListOfInt& iIntValues,
const CATListOfDouble& iDblValues,
const CATListOfCATUnicodeString& iStrValues,
const CATListOfInt& iLogLinks,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Defines several constraints for query on a specific attribute. For example, searches for object where "Diameter" attribute value is greater than 10.0mm and "Diameter" attribute value is less than 50.0mm.
Parameters:
iAttribute
The attribute name
iUnit
The unit name (for example, "mm")
iTypeValue
The type of value of the attribute
Legal values:
  • 0:Boolean value (Yes/No)
  • 1:Integer value
  • 2:Double value
  • 3:String value
iOperators
The list of operators
Legal values:
  • 0:Equal (for integer, double and string)
  • 1:Not Equal (for integer and double)
  • 2:Less (for integer and double)
  • 3:Greater (for integer and double)
  • 4:Less or Equal (for integer and double)
  • 5:Greater Or Equal (for integer and double)
  • 6:Not Less (for integer and double)
  • 7:Not Greater (for integer and double)
  • 10:Like (for string only)
iIntValues
The list of integers values (if iTypeValue = 0 or 1)
iDblValues
The list of double values (if iTypeValue = 2)
iStrValues
The list of string values (if iTypeValue = 3)
iLogLinks
The list of integer values describing logical links between constraints
Legal values:
  • 0:AND
  • 1:OR
o AddDiameterBetweenConstraint
public virtual HRESULT AddDiameterBetweenConstraint( const double& iMinValue,
const double& iMaxValue,
const CATUnicodeString& iUnit,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Defines one simple constraint for query on "Diameter" attribute. For example, searches for object whose "Diameter" value is between 10.0mm and 20.0mm.
Parameters:
iMinValue
The diameter minimum value
iMaxValue
The diameter maximum value
iUnit
The unit name
o AddNameLikeConstraint
public virtual HRESULT AddNameLikeConstraint( const CATUnicodeString& iValue,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Defines one simple constraint for query on "Name" attribute. For example, searches for object whose "Name" is "Sample".
Parameters:
iValue
The reference name
o AddSubComponentTypeConstraint
public virtual HRESULT AddSubComponentTypeConstraint(CATIMfgResourceQuery::MfgResourceQueryType iResourceType,
const CATUnicodeString& iFamily)=0
Defines the type of resource on which we want to add constraints. Only used for Tool Assembly queries
Parameters:
iResourceType
The type of resource (MfgTool or MfgInsert).
iFamily
The family of the resource (MfgEndMillTool, MfgRoundInsert...), defined in CATMfgToolConstant & CATMfgInsertConstant
o Execute
public virtual HRESULT Execute()=0
Executes the defined query.
o GetComponentNameAndIndex
public virtual HRESULT GetComponentNameAndIndex( const int& iNumElem,
CATUnicodeString& oCompName,
int& oCompNumElem,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Retrieves the Tool or Insert name defined on the tool assembly, and its index.
Parameters:
iNumElem
integer representating the index of the tool assembly
oCompName
The component name
oCompNumElem
integer representing the index of the tool assembly component, use GetDescription with same MfgResourceQueryType and this index to get its values
iResourceType
type of resources to retrieve (MfgTool or MfgInsert)
o GetCorrectors
public virtual HRESULT GetCorrectors( const int& iElem,
CATListOfCATUnicodeString& oListPoints,
CATListOfInt& oListNumber,
CATListOfInt& oListLengthNumber,
CATListOfInt& oListRadiusNumber,
CATListOfDouble& oListDiameter,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Retrieves the correctors information.
Parameters:
iElem
The object number
oListPoints
: List of type point as CATUnicodeString (Ex: P1, ..., P9)
oListNumber
: List of corrector number as Integer
oListLengthNumber
: List length Corrector number as Integer
oListRadiusNumber
: List radius Corrector number as Integer
oListDiameter
: List tool diameter for this point as Double
o GetDescription
public virtual HRESULT GetDescription( const int& iElem,
CATListOfCATUnicodeString& oAttributes,
CATListOfInt& oTypeValues,
CATListOfInt& oNbValues,
CATListOfInt& oIntValues,
CATListOfDouble& DblValues,
CATListOfCATUnicodeString& StrValues,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Retrieves the values of an object responding to the defined query.
Parameters:
iElem
The object number
oAttributes
List containing attributes of the object
oTypeValues
List containing types of values of the attributes
Legal values:
  • 0: boolean
  • 1: integer
  • 2: double
  • 3: string
oNbValues
List containing number of values for each attribute
oIntValues
List containing integer type values
oDblValues
List containing double type values
oStrValues
List containing string type values
o GetNamesToDisplay
public virtual HRESULT GetNamesToDisplay(CATListOfCATUnicodeString& oListNames)=0
Retrieves the names of query location to display in the selection panels.
Parameters:
oListNames
The list of names to display (describing the database or catalog names)
o GetRepresentation
public virtual HRESULT GetRepresentation( const int& iElem,
CATIDocId*& oDocId,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Retrieves the representation of an object responding to the defined query.
Parameters:
iElem
The object number
oDocId
The CATIDocId to the external file (for example, CATPart document) containing the representation of the object
o GetRepresentation
public virtual HRESULT GetRepresentation( const int& iElem,
CATUnicodeString& oPathName,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Retrieves the representation of an object responding to the defined query.
Parameters:
iElem
The object number
oPathName
The path to the external file (for example, CATPart document) containing the representation of the object
o GetResultSize
public virtual HRESULT GetResultSize(int& oNbElem,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent)=0
Retrieves the result size of the defined query.
o InitConnection
public virtual HRESULT InitConnection()=0
Initializes the connection to the repository for query execution.
o Initialize
public virtual HRESULT Initialize( const CATUnicodeString& iName,
const CATUnicodeString& iType)=0
Initializes the query on the resource object.
Parameters:
iName
The name of the database or catalog.
iType
The family of the searched object (ex:End Mill Tool)
o InstantiateResourceInDocument
public virtual HRESULT InstantiateResourceInDocument( const int& iElem,
CATBaseUnknown_var& hBUResources,
CATIMfgResourceQuery::MfgResourceQueryType iResourceType=MfgCurrent,
CATDocument* piDoc= NULL)=0
Instanciate the resource in the document.
Parameters:
iElem
The object number
hBUResources
The handler on the created resource
piDoc
The CATDocument where the resource has to be instantiated
o ResetConnection
public virtual HRESULT ResetConnection()=0
Resets the connection to the repository for query execution.

Enumerated Types


o MfgResourceQueryType
enum MfgResourceQueryType {
  MfgCurrent,
  MfgTool,
  MfgInsert
}
Defines the type of resource on which we want to add constraints.
Parameters:
MfgCurrent
The constraint we are defining works on the current type of resource defined with Initialize.
MfgTool
The constraint we are defining works on the tool component.
MfgInsert
The constraint we are defining works on the insert component.

This object is included in the file: CATIMfgResourceQuery.h
If needed, your Imakefile.mk should include the module: MfgItfEnv

Copyright © 2003, Dassault Systèmes. All rights reserved.