This programming API is for advanced customization of Parabuild.
The functions that make User shortcuts work are also exposed with this API.
For now, only the Lisp and the C++ programming languages are supported.

For use in your Lisp/VLX functions you can just call the appropriate API functions, they are automatically registered when Parabuild is loaded.

To use this API in your ObjectARX/ ObjectBRX project simply include the header file \Parabuild\Api\PbApi.h into a .cpp file of your ObjectARX or BRX project.
There is no need to link to a library file.
This header file also includes information on how to use each function.

Functions

These are all the function names in bold. Behind each function name you can find the comment about the input and (optional) output of the functions.


GetProperty Input: Object, property name (may have redirection, ex: "Main.PartNumber")

SetProperty Input: Object, property name, value

ReplacePropertiesInString Input: Object, string with %properties%


GetFilterNames Output: List of all named filters

ObjectFilterPasses Input: Object, filter name. Output: boolean

FilterObjects Input: Filter name, objects (object list or pickset). Output: filtered objects (object list or pickset, same one as input)

GetObjectsByFilter Input: Filter name. Checks whole modelspace. Output: list of objects

GetSelectionSetByFilter Input: Filter name. Checks whole modelspace. Output: selection set (caller should free it)

CreateTemporaryFilter Input: name, matchAllConditions, Value1a, condition1, value1b, (Value2a, condition2, value2b), (Value3a, condition3, value3b), ...

DeleteTemporaryFilter Input: filter name


After the caller did all their apply/smartcopy/propagate/macro changing calls, it may be best to call PbApiEvaluateMacros

GetOwningMacro Input: Geom. Output: macro

GetOwningModule Input: Geom. Output: module name

GetMacroBases Input: macro. Output: list of geoms

GetMacroOwnedEntities Input: macro, skipConstructionGeoms. Output: list of geoms

InsertMacroTemplate Input: filename. Output: main macro id, inside a block. 

ApplyMacro Input: template filename, new base geometries in selection order

SmartCopyMacro Input: macro, new base geometries in selection order

SetPropagateSettings Input booleans: ForceSameSections, MatchingSectionsStayMatched, EnforceFlatBeams, SectionsSameWcsOrient, SectionsSimilarWcsOrient, FlexibleBaseProfLength, FlexibleDistBetweenParallel, FlexibleAxisSideOffset, FlexibleAxisSideAngle, SameRelativePathAngles, AllowMirror

PropagateMacro Input: macro, (new bases), (bool allowPartialSelection), (bool allowAllLevels). From macro in the drawing (can be inside a block). To selection set or all in modelspace if no selection given

PropagateTemplates Input: list of template filenames, (optional list of bases to propagate to) (bool allowPartialSelection), (bool allowAllLevels). From template files. To selection set or all in modelspace

LoadMacroValues Input: macro, filename. Loads from saved defaults

RunMacroValueFeeder Input: Macros, addDependentMacros, Excel filename, mapping filename, (sheetNames). Load values from excel using values feeder class. Mapping filename can be empty

EraseMacro Input: List of macros (all owned geoms will also be erased) or geoms (owning macro will be erased with all owned geoms), (eraseDependent)

GetMacroModuleNames Input: macro or geom

GetMacroVariableNames Input: macro or geom, (moduleName). If no geom and no module was specified, all macro vars returned as "ModuleName.VarName", else only module vars are returned and the module name is skipped. This only returns the "dynamic" variables defined by constraints and variables in the macro

GetMacroVariableValue Input: macro or array or geom, VarName, (module name). If a geometry is provided and no module specified, the owning module is selected

SetMacroVariableValue Input: macro or array or geom, VarName, VarValue, (module name). If a geometry is provided and no module specified, the owning module is selected

EvaluateMacro Input: macro. Eval for a specific macro, does not evaluate any others, not even dependents

EvaluateMacros Evaluate for all macros in the drawing that need evaluation


CreateMember Input: section name, placement curve, rotation, (macro id), (module name). Links prof with model line in provided macro or new one.

CreateSimpleMember Input: section name, startpoint, endpoint, (rotation WCS based). Member not constrained.

CreatePlate Input: Poly or list of pts, thickness, (origin, xAxisDir, yAxisDir) 

CreateBolt Input: Startpoint, Endpoint, Assembly, Diameter


OpenProfAdvancedDlg Input : list of profile ids

OpenMacroDlg Input : list of macro ids OR part ids


SetMemberSection Input: prof, section name

SetBoltAssembly Input: bolt, name

SetBoltDiameter Input: bolt, diam

SetBoltLength Input: bolt, length (will set to a library length)

SetAxis Input: member or bolt, startpoint, endpoint


GetPlacementCurve Input: prof, (allowCreate). Returns the placement curve, if found through macro or if newly created

GetAxis Input: prof or bolt. Creates new curve

GetSectionPolys Input: prof or plate. Creates new curve(s), and returns a list. 

GetEcs Input: member or plate or body or struct. Outputs list of: origin, xDir, yDir


GetLevelNames Returns a list of all level names

GetLevelHeight Input: levelName or level itself. Returns total height, not relative offset

GetLevelOffset Input: levelName or level itself. Returns relative offset to defining level

SetLevelOffset Input: levelName or level itself. Sets relative offset to defining level

GetDefiningLevel Input: levelName or level itself. Output: defining level name

AddLevel Input: levelName, levelOffset, (DefiningLevelName). Default defining level is wcs. Returns the level entity


IsGridLine Input: curve, bool allowByLayer

GetGridLabels Returns string array with all grid labels

GetGridCurves Returns object array with all grid curves

GetGridLabel Input: grid curve

GetGridCurve Input: grid label

SetAsGridLine Input: grid curve, grid label


ConstrainColumnLineAt Input: Point, bottom level, bottom offset, top level, top offset, (macro id), (module name)

ConstrainColumnLines Input: List of gridlines, bottom level, bottom offset, top level, top offset, (macro id), (module name)

ConstrainBeamLineAt Input: Start point, end point, levelName, level offset, (macro id), (module name)

ConstrainBeamLineBetween Input: Start column, end column, levelName, level offset, (macro id), (module name)

ConstrainBeamLines Input: List of gridlines, levelName, level offset, (macro id), (module name)

ConstrainApexBeamLinesBetween Input: Start column, end column, levelName, level offset, apexOffset, apexAngle, (macro id), (module name) - Note that apex angle is only used if apexOffset is 0

ConstrainApexBeamLines Input: List of gridlines, levelName, level offset, apexOffset, apexAngle, (macro id), (module name) - Note that apex angle is only used if apexOffset is 0


CheckHoles Input: list of objects

AutoWeldObjects Input: Settings name (empty string for current defaults), firstClassifyObjects, list of objects

RunNumbering Options: (full renumber), (local renumber)


getSectionInfo Input: section name. Output: table values

       

getStartCutPlane Input: Member. Output: point, vector
getEndCutPlane Input: Member. Output: point, vector
addDefiningCut Input: member, point, vector. Replaces defining cut if it already exists on that side of the member
addCutPolyCut Input: member, poly, extrusion height
addCutByPrpl Input: member to cut, cutting object


createAcisBody Input: object to convert into ACIS


attachSubPart Input: sub object, main object


detachSubPart Input: sub object
eraseSubPart Input: sub object


getStartPoint Input: member or bolt
getEndPoint Input: member or bolt


getSubIds Input: main part, returns list of sub parts
getMainId Input: sub part, returns main part


getPhase Returns the active project phase
getRevision Returns the active project revision


getParabuildDir Returns the Parabuild directory
getLanguage Returns the current language 
getOutputLanguage Returns the current language for output 


getProjectSetting Input: name
setProjectSetting Input: name, value


limitedClashCheck Input: list of objects. Checks only the provided objects
fullClashCheck Checks the whole drawing


getDynProperty Input: Parabuild object, name
setDynProperty Input: Parabuild object, name, value

setPlateThickness Input: plate, thickness