-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Subject
Extend native export - Enable HTML Part List.
Environment
Version of LPub3D - 2.3.7
Operating system - All
Solution
Note See #226 for the latest HTML Part List functionality update.
Recommended Prerequisite: confirm all list parts have a valid element ID by setting 'Display Part Element Annotation' in Bill of Materials Globals, then append a page and a Bill of Materials.
Bill of Materials Globals Setup, Annotations, Options settings

Add Bill of Materials menu item

Bill of Materials - all parts have a valid element ID

HTML part list options and preferences dialogue

Select an existing image file for the HTML snapshot

Also possible to type the location of existing image file

HTML part list with LEGO Element ID using an existing image file for the model snapshot

Generate a snapshot image by leaving the image line edit blank

Preferences dialogue can be used to tailor the generated snapshot image settings

Settings are saved in the 'Native Parts List' preference set

Part lookup site and element ID source - using Bricklink settings

HTML part list with Bricklink Element ID using a generated image file for the model snapshot

ADVANCED SETUP
You can also manually add BrickLink or LEGO part element IDs using the advanced configuration steps to edit the related parameter files.
For updating element IDs, the related menu items are:
-Edit LDraw to Bricklink Design ID Cross-reference: Maps the LDraw to BrickLink Design IDs.
-Edit Bricklink Color ID reference: Maps the Bricklink Color Name to a Color ID
-LDraw to BrickLink Color Code Cross-reference: Maps the LDraw LDConfig ID to Bricklink Color ID
The menu items above support codes.txt which is the default Bricklink codes extract and the actual file used by LPub3D to capture the LEGO element ID or assemble the Bricklink element ID. This file contains 3 fields: 1. Item No (Bricklink Design ID), 2. Color Name, 3. LEGO Element ID. To get the LEGO element ID, LPub3D takes the ID directly from the codes.txt file. To get the Bricklink element ID, the Color Name is matched with its Bricklink Color ID from the Color ID reference and then the Bricklink Item No is prepended to the Bricklink Color ID. As with the other parameter files. LPub3D will look in the extras subfolder for codes.txt, if found, this file will be loaded. If not found, LPub3D will attempt to download codes.txt from https://trevorsandy.github.io/lpub3d/assets/resources/codes.txt.
The exported files header will have guidance on the required fields, delimiter etc...
The shots below show the steps to export and edit the Part Annotation Style Reference:
Export status and file location information.

Exported list automatically opened in LPub3D parameter file editor

NOTE in v2.3.8, the wrong Part Annotation Style Reference regular expression is exported.
Replace line: # The Regular Expression used is: ^([^\t]+)\t+\s*([^\t]+)\t+\s*([^\t]+).*$
With line: # The Regular Expression used is: ^(\b[^=]+\b)=([1|2])\s+([1-6])?\s*([^\s]+).*$
Cheers,



