CalWin
  • Introduction
  • Code Snippets
  • Useful SQL statements
  • CalWin Script
    • Hardware Script
      • GetQty
      • DefineParts
      • WorkXXX
      • Script classes
        • TWorkWrapper
        • TFrameWrapper
        • TDividerWrapper
    • System script Events
      • OnAdjustStainLoad
      • OnAfterCalcItemRequirement
      • OnCalcPriceListAddition
      • OnCalcProductPurchaseDeliveryTime
      • OnCalcSalesHeaderAutoLineData
      • OnCalcSashLeadWeight
      • OnCheckFromSemiStock
      • OnCheckFromStock
      • OnCheckGlassFromStock
      • OnCheckProduct
      • OnCheckSalesheaderRules
      • OnCheckSaleslineDates
      • OnGetBatchGroup
      • OnGetClassification
      • OnGetDiscountGroup
      • OnGetElementProfile
      • OnGetLoadPoints
      • OnGetProductSourceAltParams
      • OnGetProductSourceParams
      • OnGetprofile (deprecated)
      • OnGetSaleslinesSourceParams
      • OnGetStockItemGroup
      • OnIncludeBottleneckLoad
      • OnIncludeCheckpoint
      • OnIsSpecialProduct
      • OnModifyEdgeList
      • OnModifyKickPlate
      • OnModifyVariants_Final
      • OnModifyVariants_Initial
      • OnSalesheaderPriceFinalization
      • OnSetElementJointType
      • OnSetSileDividersPos
      • OnSetTranMullDesignCode
      • OnSetTranMullDividersPos
      • Helper Procedure Repository
        • Loop ElementList
    • Machine Link
      • Machine Link Events
        • Initialize and Finalize
        • BeforeOptimization
        • PreParseMain_xxx
        • PostParseMain_xxx
        • ParseChild_xxx
        • BeforeOutput_xxx
      • How to use a search table in Machine Link
  • Brukerdokumentasjon (NOR)
    • Fullkostkalkyle
    • Bonus og markedsstøtte
    • CalWin enhet og faktor
    • Kalenderen
    • Budsjett
    • Eksport til Excel
    • Dokument-hÃ¥ndtering
  • Misc documentation
    • CalWin 64-bit Beta
    • CalWin E-Quote
    • CalWin WEB Dashboard
    • Oracle related
      • Oracle Database Server Requirements
      • Oracle DBA
        • Resize and rename data files
        • Arhivelog mode
        • LISTENER.ORA
        • Connection strings
        • Create Oracle user (schema) for CalWin
        • Create a database link
        • Password expiration
        • Add a Directory object
        • Show table space size
        • Recovery Area Space
        • ORA-00257 - not enough space in recovery file
    • CalWin Server
      • Legg til web certificate
Powered by GitBook
On this page
  • Procedure WorkLeft/WorkRight/WorkTop/WorkBottom
  • procedure WorkElements

Was this helpful?

  1. CalWin Script
  2. Hardware Script

WorkXXX

Procedure WorkLeft/WorkRight/WorkTop/WorkBottom

In these procedures all processings (work) on the left, right, top or bottom frame or sash should be added.

Example

//Simplified example of WorkTop for a vent option
procedure WorkTop(aWrapper: TWorkWrapper);
var
  vPosition,vTemp: Double;
begin
  vTemp := aWrapper.Element.Length / (aWrapper.Qty + 1);
  vPosition := aWrapper.Num * vTemp;
  aWrapper.Position := vPosition;
  aWrapper.AddWork(vPosition,0,0,'Vent');
end;

Note

Only the Work-procedures on the sides that are possible for the option needs to be present.

procedure WorkElements

In this procedure work can be added on all sides, and can therefore replace the separate WorkLeft/WorkRight/WorkTop/WorkBottom procedures.

aWrapper.Element needs to be set by the script before calling AddWork/AddAdjacentWork etc.

Example

// TODO Code Example

Note

For drainage hole scripts aWrapper.ElementList can be iterated in procedure WorkElements, and for each element in the list that should have drainageholes, aWrapper.Element should be set and then AddWork called. That way frame, sash, transom, mullion and muntin bar elements can all have drainage holes added.

PreviousDefinePartsNextScript classes

Last updated 2 years ago

Was this helpful?