Closed snakebyte73 closed 1 year ago
Thank you for reporting this behaviour.
I'll take a look.
Cheers,
What is the purpose of the numerous spurious INSERT PICTURE
lines and empty STEP
commands in the example model file you provided ?
For example there are many steps with the following configuration:
0 !LPUB INSERT PICTURE "T:/Standard Docs/Instructions By.png" SCALE 0.82107 OFFSET -9.77465e-5 0.888859
0 STEP
Moreover, the image file 'By.png' was not provided so each of these lines will produce and error message.
There are also many CALLOUT DIVIDER
commands without any CALLOUT BEGIN
(and END
) commands.
Can you provide a properly configured example model file ?
Cheers,
The Insert picture is used for this You can jyst remove the picture from the steps The many empty steps is just missing cleanup after testing what made LPub crash :)
I cleaned up the test file and it still fails: TestProject 3D.zip
Excellent. Many thanks.
Indeed, I have found the problem which was because of the naming convention you are using for the custom parts. An underscore _
in the name is an invitation for problems as LPub3D is using this character as a delimiter. While the _
character is treated for most use cases, there as obviously still edge cases that from time-to-time will present with unexpected behaviour. Your safest bet is to use hungarian notation as a naming convention for parts - e.g. dsbIc38wAntenna1L.dat
Also in the custom part code above, there is a spurious NOFILE command which is not needed for parts.
Cheers,
Thanks That did the trick :) After correcting the parts as described by you and "Archiving Unofficial Parts" and a restart of LPub3D it works correctly I am a programmer myself and a little puzzled that an underscore can cause such problems ?? Usually I use underscores to prevent whitespace problems :D In all the time i have used LPub3D this has never been a problem berfore??
But if it works, no problem, I will start renaming all my custom parts :D
I've updated the BOM render behaviour to support parts with underscore(s) and/or dash(es) in the name.
Cheers,
Thanks again :) And I think it is awesome all the time you invest in this program.
Subject
When I use a custom hose part I made LPub3D crashes when generating the BOM. It does show the custom hose in the step PLI. The custom hose is just a 2L hose I am using Native renderer If i switch to LDView renderer instead of Native it does not fail. But it is a lot slower than Native renderer The dat file is copied to this folder: C:\Users\Public\Documents\LDraw\Unofficial\Hoses\ The folder is part of the search dirs in LPub3D
Content of the file: DSB_IC3_8W_Antenna_2L.dat
0 DSB_IC3_8W_Antenna_2L 0 Name: DSB_IC3_8W_Antenna_2L.dat 0 Author: Knud Ahrnell Albrechtsen [Snakebyte] 0 !LDRAW_ORG Unofficial_Part 0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt 0 BFC CERTIFY CCW 0 !CATEGORY Custom Hoses 0 !KEYWORDS Train, Diesel Engine, DSB IC3, Hose
0 SYNTH BEGIN TECHNIC_FLEX-SYSTEM_HOSE 16 0 SYNTH SHOW 0 GHOST 0 MLCAD HIDE 1 71 0 10 -9 1 0 0 0 1 0 0 0 1 LS01.dat 0 GHOST 0 MLCAD HIDE 1 71 0 -29 -9 1 0 0 0 1 0 0 0 1 LS01.dat 0 SYNTH SYNTHESIZED BEGIN 1 16 0 10 -9 1 0 0 0 -39 0 0 0 1 LS50.dat 0 SYNTH SYNTHESIZED END 0 SYNTH END 0 0 NOFILE 0
Environment
Configuration
%USERPROFILE%\AppData\Local\LPUb3D Software\LPub3D\
reg export "HKEY_CURRENT_USER\Software\LPub3D Software" %USERPROFILE%\Desktop\LPub3D_Hive.reg
[Application data path]/ldv/ldvExport.ini
[Application data path]/3rdParty/ldglite-1.3/config/ldglite.ini
[Application data path]/3rdParty/ldview-4.5/config/ldview.ini
[Application data path]/3rdParty/ldview-4.5/config/ldviewPOV.ini
[Application data path]/3rdParty/lpub3d_trace_cui-3.8/config/povray.conf
[Application data path]/3rdParty/lpub3d_trace_cui-3.8/config/povray.ini
Logs
[Application data path]/logs/LPub3DLog.txt
[LDraw model path]/stdout-ldglite
[LDraw model path]/stdout-povray
[LDraw model path]/stderr-ldglite
[LDraw model path]/stderr-povray
Screenshots
LPub_Settings.zip TestProject 3D.zip
Steps to reproduce
Add the custom part to the instructions and go to BOM. Provide a sample mpd/ldr file that reproduces the problem.
Expected behaviour
Create the BOM containing custom parts
Actual behaviour
Error message and the crash
Workaround
Share your work around if available
Solution suggestion
Share your opinion on how to achieve the expected behaviour