Skip to main content

Module source

Module source 

Source
Expand description

Reading a wizard Level straight from an assembly document’s JSON.

An assembly document lists its placements as ACOMP features (inputParams.id, partName, isFixed, bom.Find_Number), embeds each placed part in its partsLibrary (with sourceSignature and the part’s own document, whose partAttributes say Fastener, Torque and Serial_Tracked), keeps its mates in assembly.constraints (each naming entities by elements), and its exploded views as PMI views with explode rows. A placed part whose own document has placements is a sub-assembly, read the same way one level down.

Constants§

MAX_DEPTH
How deep sub-assemblies are read.

Functions§

has_placements
Whether a document places parts (is an assembly).
level_from_document
The level of document, its placements’ paths under prefix ("ACOMP1" when the document is placed as ACOMP1, "" at the top), the level itself at path ("" for the target assembly).
plm_part_id
The PLM part id a library entry’s source key names: part/<id>/rev/<rev> (a PLM session’s key) or the explorer’s path form of it (/models/part/<id>/rev/<rev>.nbrep); None for a file’s key.