XSTEEL高级教程2.docx
《XSTEEL高级教程2.docx》由会员分享,可在线阅读,更多相关《XSTEEL高级教程2.docx(39页珍藏版)》请在冰点文库上搜索。
![XSTEEL高级教程2.docx](https://file1.bingdoc.com/fileroot1/2023-6/15/d9c973cf-9f27-4772-bc4b-c9b08f261735/d9c973cf-9f27-4772-bc4b-c9b08f2617351.gif)
XSTEEL高级教程2
Lesson2–Templates
Whataretemplates2
TemplateTableTypes2
TemplateTableParts5
TemplateObjects7
TemplateConditions–Rules&Syntax31
Whataretemplates
TemplatesaredescriptionsofformsandtableswhichcanbeincludedinXsteel.Theformscanbegraphicaltobeincludedindrawingsastables,textblocks,drawingheaders,orASCIItextformtobeusedasreports.Thecontentoftemplatefieldsarefilledbytheapplicationusingthetemplatesatruntime.
TemplatesarecreratedandeditedbyusingTemplateEditor,whichisaseparateapplicationinXsteel.TemplateEditorcanbeopenedinXsteel“Tools”“Templates…”dropdownmenu.
TemplateTableTypes
Tabletypeisusedforfilteringandselectingpartstobepresentedonthereportordrawingtable.Thisoptioncanbefoundunderthe“Settings”pulldownmenu.
Note:
TabletypeinTablenamemustbethesameasinSelection.
Reportscanbecreatedforthewholemodelorselectedparts.Onlypartsandboltscanbeselectedforreports.Assembliesandotherobjectsareselectedbytheparts.Fordrawingreports,youcancreatereportforallorselecteddrawings.
AvailableTableTypesareasfollows:
ALL
ThisTabletypeisusedforlistsofparts,boltsandholesandfiltersoffallobjectswhicharenotpartsorbolts(holescomewithbolts).Allboltswhichareconnectedtotheselectedpartsarealsoincludedinthelist.
PART
ThisTabletypeisthesameasALL,butholesarefilteredoff
BOLT
ThisTabletypeisusedforscrewandboltlists.Itfiltersoffallobjectswhicharenotoftype‘bolt’andselectsallboltswhichareconnectedtoselectedparts.
JOINT
ThisTabletypecollectsjointsandcanbeusedforlistsincludinginformationofthejoint.FieldswhichcanbeusedintheselistsstartswithJOINT...
WELDING
ThisTabletypecanbeusedforlistsofwelds.
JOINT_WELDING
ThisTabletypeissameasWELDINGbutalsojointswhereweldsareassociatedarealsocollected.Thistabletypemakesitpossibletomakehierarchicallistsofjointsandweldsbelongingtothem.
NUT
ThisTabletypeisusedfornutlistsandfiltersoffallobjectswhicharenotoftype‘bolt’.Itselectsallnutsofallboltswhichareconnectedtoselectedparts.
WASHER
ThisTabletypeisusedforwasherlistsandfiltersoffallobjectswhicharenotoftype‘bolt’.Itselectsallwashersofallboltswhichareconnectedtoselectedparts.
ASSEMBLY
ThisTabletypeisusedforlistsofassembliesandsinglepartsandfiltersoffallobjectswhicharenotsinglepartsorassemblies.Itselectsallassembliesoftheselectedpartsandbolts.
ASSEMBLY_ALL
ThisTabletypeissimilartotheALLTabletypebutalsoassembliesareincludedinthelist.IfthefieldASSEMBLY_POSexistsinthelistwithsortorder1,fieldsaresortedinthefollowingorder:
1.assembly
2.partsoftheassembly
3.holesofthepart
TabletypeASSEMBLY_ALLfiltersoffallobjectswhicharenotoftypeassembly,partorbolt.ThisTabletypemakestheselectionintwosteps.Itfirstselectsalltheassembliesoftheselectedpartsorboltsandthenselectsallthepartsandboltsoftheassembliesselectedinthefirststep.Inotherwords,allpartsandholesofanassemblycanbeselectedbyanyincludedpartorbolt.
IncaseoftabletypeASSEMBLY_ALLNUMBER-fieldreturnsnumberofpartsincludedtooneassembly.
ASSEMBLY_BOLT
ThisTabletypeissimilartoASSEMBLY_ALLexceptpartsarefilteredoff.
ASSEMBLY_CONN
ThisTabletypeisusedforlistsofassemblyconnections.i.e.liststellingwhichassemblyisconnectedtowhichoneandthroughwhichparts.
ASSEMBLY_PART
TypeTabletypeissimilartoASSEMBLY_ALLexceptboltsarefilteredoff.
SIMILAR
TheTabletypeSIMILARcollectsallthesimilarpartsfromthemodel.Thistabletypecanbeusedformakinglistofassembliesincludingpartssimilartotheselectedones.TabletypeSIMILARcanbeusede.g.insinglepartdrawingsforthetablewhichtellstheassembliesinwhichthesinglepartisincluded.
SIMILAR_ASS
TheTabletypeSIMILAR_ASScollectsallthesimilarassembliesofthemodel.Thistabletypecanbeusedformakinglistsofassemblieshavingsamemarkbutalteringadditionalinformation.E.g.alistinassemblydrawingtellinginwhichphasesassemblieswithsamemarkarefound.
DRAWING
ThisTabletypeisusedfordrawinglistswithoutrevisionhistoryinformation.Thistypecanbeusedonlyforreportsandcollectsalldrawingsinthemodel.
DRAWING_REV
ThisTabletypeisusedfordrawinglistswithandincludesthepossibilitytohavethecompleterevisionhistoryofeachdrawing.Thistabletypecanbeusedonlyforreportsandcollectsalldrawingsinthemodelwithalltheconnectedrevisions.
PART_HOLE
ThisTabletypeisusedforthelistsincludingpartsandtheholes(createdwiththebolts)oftheparts.Thislistshouldnotbeusedforboltlistsbecauseeverypartconnectedtogetherwithaboltselectsalsothehole(bolt)tothelist,whichiscorrectforholesbutnotforbolts.
ASSEMBLY_HOLE
ThisTabletypeworksinthesamewayasASSEMBLY_BOLT,buttheholesarecollectedinthecorrespondingwayasinPART_HOLElist.Sothistypecanbeusedforhierarchicallistsincludingassemblies,partsbelongingtoassembliesandholesintheseparts.
Note:
TabletypedefineswhichtextfieldsareavailableintheTemplate.
TemplateTableParts
AtemplatemayconsistofsixdifferentTableparts:
header,pageheader,row,intermediaterow,pagefooterandfooterbutalltheseTablepartsneednottobepresentineachtemplate.ForexampleasimpleGeneralNotetemplatecontainingonlytextusuallyhasonlya‘Header’.EachTablepartofthetemplateconsistsoflines,arcs,text,symbols,fillareasortextfields.Reporttemplatesaresimilartodrawingtemplatesbutonlyincludeitems,whichcanbeprintedtoanASCII-file.ie.Theycannotcontaingraphics.
Tablepartsaredefinedbydrawingtablepartframesaroundtheobjectstobeincludedintothedecidedtablepart.Thereferencepointforhorizontalandverticalpositioningoftablepartsiscalculatedbytheextremesoftheobjectsinside,notbythetablepartframes.Thepositioningcanbecontrolledwiththemarginproperties.Theoutputofrowsandintermediaterowscanbecontrolledwith‘Rules’(otherwiseknownasTemplateConditions).SeeSection“Template-Conditions”.
Note:
AllobjectsmustbecompletelyinsidetheTablePartframe!
Header
AHeaderappearsonlyonceatthebeginningofeachtemplate.Onlyoneheadercanexistineachtemplate.Aheadercannotincludepart/assembly/bolt/weldinformation.
Pageheader
Pageheaderappearsatthebeginningofeachpageoronlyatevenoroddpagesdependingontheproperties.Thefirstpagehastheheaderbeforethepageheader.Pageheadersareusedmainlyinreports,buttheycanbeusedalsoindrawingtemplatestorepeatcertainlabelsaftereachnlinesofthetable.Severalpageheaderscanexistineachtemplate.(e.g.differentpageheadersforoddandevenpages).
Row
Arowcanberepeatedseveraltimeswhileoutputtingthetemplate.Theapplicationusingthetemplatedecidestheamountofrowstobeoutput.Rules(otherwiseknowasconditions)canbeusedforcontrollingtherowoutput.Onlyonerowcanexistineachtemplate.Rowscanconsistofseverallines.
Theactualsortingoftherowsisdonebytheapplicationusingtemplates.Sortingkeysaredefinedbyassigning‘sortorder’valuestothenecessaryfieldsintherow.
Intermediaterow
Intermediaterowscanbeusedtoproduceadditionaloralternativeinformationtorows(e.g.intermediatesums).Theremaybeseveraldifferentkindofintermediaterows.Theattributes(textfields)andsortorderdefinetheoutputorder.Rulesareusedforcontrollingtheoutputofintermediaterows.
Note:
Negativesortordercanbeusedforreverseordersetting.
Pagefooter
Pagefooterisoutputattheendofthepage(See‘Pageheader’above).Severalpagefooterscanexistineachtemplate.
Footer
Footerisoutputafterthepagefooterofthelastpage.
TemplateObjects
Agraphical(ie.Drawing)templatecancontain:
•Lines(drawing)
•Fillareas(drawing)
•Symbols(drawing)
•Text(drawing/report)
•Textfields(drawing/report)
ReporttemplatescancontainonlyTextandTextfields.
Everytablepartmayhaveallthetypeslistedabove.Forexample,arowmayincludegraphicalobjectswhichwillbeoutputwitheveryline.
Line
“Settings”“Pen”opensadialogueboxfordefiningthecolourandoutlookoftheline
Functionlinecreatesalinebetweentwopickedpositions.LineiscreatedusingcurrentlydefinedLinepropertiesandPensettings.Positionscanbepickedeitherbypickingordragging.
Tocreateapolylinepickthestartingpointandtheendpointsofthefirstlineandthenendpointsofthefollowinglinesbyclickingordragging.Clicktwiceinthesamepositiontoendthepolyline.
NOTE:
Linecolourdefinesthethicknessofeachlineinplotteddrawings.ThisiscontrolledinXsteel“Plotterdatabase”“Penmap”andbyenvironmentvariableXS_BASE_LINE_WIDTH=0.1
FilledArea
Tocreateafilledareapickthevertexpointsoffilledarea.Togetcurvededgesusedrag.Clickinthesameplacetwiceoronthestartingpointtofinishthecurrentfillarea.
Symbols
SymbolscreatedwithSymbolEditorcanbeaddedtodrawingtemplates.ToaddsymbolsselectfirstthesymbolfileandsymbolfromSymbolpropertiesdialogueboxandpickthepositionforsymbolreferencepointandangle.
Symbolpropertiesdialogueboxcanbeusedforselectingsymbolsandsettingpropertiesfornewandexistingsymbols.
Note:
onlysymbolsresidinginthepredefinedsymboldirectorycan