Skip to content

Extend native export - Enable HTML Part List #196

@trevorsandy

Description

@trevorsandy

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
Screenshot - 09_04_2019 , 01_18_35

Add Bill of Materials menu item
Screenshot - 09_04_2019 , 20_16_06

Bill of Materials - all parts have a valid element ID
Screenshot - 09_04_2019 , 20_19_01

Menu item
Screenshot - 29_03_2019 , 18_28_26

HTML part list options and preferences dialogue
Screenshot - 29_03_2019 , 18_29_41

Select an existing image file for the HTML snapshot
Screenshot - 29_03_2019 , 19_00_28

Also possible to type the location of existing image file
Screenshot - 29_03_2019 , 19_41_54

Status prompt
Screenshot - 29_03_2019 , 19_43_19

HTML part list with LEGO Element ID using an existing image file for the model snapshot
Screenshot - 29_03_2019 , 19_44_35

Generate a snapshot image by leaving the image line edit blank
Screenshot - 29_03_2019 , 19_45_38

Preferences dialogue can be used to tailor the generated snapshot image settings
Screenshot - 30_03_2019 , 02_21_11

Settings are saved in the 'Native Parts List' preference set
Screenshot - 30_03_2019 , 02_21_29

Part lookup site and element ID source - using Bricklink settings
Screenshot - 30_03_2019 , 02_09_00

HTML part list with Bricklink Element ID using a generated image file for the model snapshot
Screenshot - 30_03_2019 , 02_11_09

Screenshot - 30_03_2019 , 02_12_22

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:

Menu item
Screenshot - 06_04_2019 , 09_19_15

Export status and file location information.
Screenshot - 06_04_2019 , 09_09_08

Exported list automatically opened in LPub3D parameter file editor
Screenshot - 06_04_2019 , 09_15_14

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,

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions