public class GoMTEnvironment

Definition of so-called Environmental methods for the GO MT Implementation.

Fields

public static var getInstance
Get the singleton instance
private static var sInstance

Methods

public func createObject(pMode, pPkg, pArtNo, pVar, pArgs, pPCContext, pWCPos, pWCRot)
Creates an object at the specified position
public func deleteBasketItems(pItemIds)
Delete objects from the basket
public func getArticleData(pId, pKeys)
Returns various kinds of data for an article
public func getDefaultPriceDate()
Returns the default price date
public func getInsReferenceObj()
Returns the reference object that was active during the last insertion
public func getMTChildInsertAP(pObj)
Returns the attach point if the OFML article was inserted as a child
public func getMTChildren(pObj)
Returns the (real or simulated) children of an OFML article
public func getMTFather(pObj)
Returns the (real or simulated) father of an OFML article
public func getObjectDPos(pObj)
Returns the reference number of an object
public func initialize()
Create the singleton instance
public func lockObjects(pMode, pArgs)
Lock a set of objects in the application's object cache
public func setDefaultPriceDate(pDate)
Sets the default price date
public func setObjectDPos(pObj, pDPos)
Sets the reference number of an object
public func startQueryPoint(pId, pPrompt)
Let the user pick a point
public func unlockAllObjects()
Unlock all objects formerly locked by lockObjects()
public func updateObject(pObjName, pChangeMode, pParam)
Updates the planning environment if the OFML article was changed (removed, re-positioned)

Documentation

PURPOSE:
Definition of so-called Environmental methods for the GO MT Implementation.

INHERITS: -

USES: -

public func lockObjects(pMode, pArgs)
Lock a set of objects in the application's object cache.

IN
  • Symbol pMode - tells how the objects are specified:
    • @BOUNDS_2D - objects are specified by a 2D bounding box in the XZ-plane.
    • @OBK_IDS - objects are specified by their BasketItemIds.
    • @ARTICLES - objects are specified by their commercial parameters and an optional 2D bounding box in the XZ-plane.
  • Any pArgs - mode dependend:
    • @BOUNDS_2D - Float[4] [x0, z0, x1, z1] specify the bbox.
    • @OBK_IDS - [Int flags, String[] ids].
      • currently supported flags are:
          1 : Delete articles on unlock
    • @ARTICLES - [][domain, args]
    • domain can be one of the following
      • @BOUNDS_2D - objects are specified by a 2D bounding box in the XZ-plane args: Float[4] [x0, z0, x1, z1] specify the bbox.
      • @MAN_ID - manufacturer ID.
      • @SER_ID - series ID.
      • @ART_NO - article number (BAN + VarCode).
      • @SHORT_TEXT - article short text.
      args: string
        For @ART_NO and @SHORT_TEXT the search string may contain wildcards ('?', '*').
OUT
  • Primitive rObjects[] - list of cached objects (possibly empty) or NULL if an error occured or the function is not implemented.

public func unlockAllObjects()
Unlock all objects formerly locked by lockObjects().
After this call, the objects may be deleted by the application.

public func deleteBasketItems(pItemIds)
Delete objects from the basket. Has only effect in applications derived from OBK like P-BK and P-XCAD.

IN
  • String pItemIds[] - the BasketIds of the items.

OUT
  • -

public func getArticleData(pId, pKeys)
Returns various kinds of data for an article.

IN
  • String pId - The ID as provided by the updateGlobal() UE (Typically an OBK Id or an OFML object name).
  • Symbol pKeys[] - The following keys are currently supported:
    • @AN_BASE - The base article number.
    • @AN_FINAL - The final article number.
    • @AN_VARCODE - The variant code.
    • @PROG_ID - The program ID.
    • @SC_CHILD_PROPS - The addStateCode for @ChildProps.
    • @QUANTITY - The article count.
    • @FATHER_ID - The OBK ID of the father.
    • @SUBPOS_IDS - The OBK IDs of the children.
    • @PRICE_DATE - The price date of the article.

OUT
  • Any pData[] - The corresponding data items.

public func getDefaultPriceDate()
Returns the default price date.

IN
  • -

OUT
  • String pDate- The price date.

public func setDefaultPriceDate(pDate)
Sets the default price date.
Newly created articles will have this price date.

IN
  • String pDate- The price date.

  • OUT
    • -

    public func createObject(pMode, pPkg, pArtNo, pVar, pArgs, pPCContext, pWCPos, pWCRot)
    Creates an object at the specified position.

    IN
    • Symbol pMode - The creation mode:
      • @METATYPE - Create it as a full instance, in case of an MT call the rules.
      • @ARTICLE - Create it as a full instance.
      • @PLACEHOLDER - Create it as placeholder.
      • @ITEM - Create it as light-weighted pseudo instance.
      • @OBK_ITEM - Create it as pure basket item w/o geometrical representation.
      • @OBK_ITEM_NOMT - Create it as pure basket item w/o geometrical representation and without Metatypes.
      • @OBK_FOLDER - Create a basket folder.
    • String pPkg - The OFML package of the article. e.g. "::ofml::go"
    • String pArtNo - The base article number.
    • String pVar - The variant code.
    • String pArgs - Additional arguments or NULL.
      • In the case of OBK_ITEM, OBK_ITEM_NOMT this is [pFather, pQuantity].
        In the case of OBK_FOLDER, this is [pFather, pLabel].
    • Vector pPCContext - (Customized) Preconfiguration Context or NULL.
      • (Symbol pProperty, Any pValue)[]
        Values specified in this optional context have a higher priority than those of the global PC.
    • Float pWCPos[3] - The position in 3D OFML space.
    • Float pWCRot[3] - The rotations around x-y-z axes (in that order) in OFML space. Currently the x and z axes are ignored.

    OUT
    • For pMode equal to @METATYPE, @ARTICLE or @PLACEHOLDER:
      • Primitive - Reference to the created object or NULL.
    • For pMode equal to @ITEM:
      • Integer - 1 for successful creation, 0 else.
    • For pMode equal to @OBK_ITEM or @OBK_FOLDER:
      • String - The OBK Id.

    public func getMTFather(pObj)
    Returns the (real or simulated) father of an OFML article.

    IN
    • Object pObj - The OFML article object.

    OUT
    • Object pFa - The father object or NULL if there's no father.

    public func getMTChildren(pObj)
    Returns the (real or simulated) children of an OFML article.

    IN
    • Object pObj - The OFML article object.

    OUT
    • Object pChildren[] - The children objects (may be empty).

    public func getMTChildInsertAP(pObj)
    Returns the attach point if the OFML article was inserted as a child.

    IN
    • Object pObj - The OFML article object.

    OUT
    • Symbol pKey - The MT key of the attach point or NULL if no attach point was defined.

    public func getInsReferenceObj()
    Returns the reference object that was active during the last insertion.

    IN
    • -

    OUT
    • Object pObj - The reference object or NULL if there's no reference object.

    public func updateObject(pObjName, pChangeMode, pParam)
    Updates the planning environment if the OFML article was changed (removed, re-positioned).

    IN
    • Object pObjName - The name OFML article object.
    • Symbol pChangeMode - The change mode:
      • @REMOVE - The article will be removed.
      • @UPDATE_POS - The article will be re-positioned.
    • Any pParam[] - Parameters of the change
      • For pMode equal to @REMOVE: Empty vector []
      • For pMode equal to @UPDATE_POS: New Position and rotation [[x, y, z], rotY].

    public func startQueryPoint(pId, pPrompt)
    Let the user pick a point. This call will start an interaction and return immedeatly. After completion a static method queryPointFinished() will be called.

    IN
    • Symbol pId - An identifier assigned by the caller, will be provided to queryPointFinished().
    • String pPrompt - A prompt text to be shown to the user, NULL selects the default prompt (implementation is optional).

    OUT
    • -

    public func setObjectDPos(pObj, pDPos)
    Sets the reference number of an object.

    IN
    • Object pObj - The OFML article object.
    • String pDPos - The new reference number.

    OUT
    • -

    public func getObjectDPos(pObj)
    Returns the reference number of an object.

    IN
    • Object pObj - The OFML article object.

    OUT
    • String pDPos - The reference number.

    public func initialize()
    Create the singleton instance. This is usually done by the application.

    public static var getInstance
    Get the singleton instance. If this function returns NULL, no locking is required by the application.

    private static var sInstance


    This class has no child classes.
    Author:
    Sebastian Schmidt, EasternGraphics

    top page alphabetic index hierarchy of classes


    © 1999-2016 EasternGraphics GmbH

    generated by doc++