LDraw.org Discussion Forums

Full Version: How to get parts list withour grouping by sub models?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Travis Cobbs Wrote:As far as I know, LPub can use either LDView or POV to generate it's images, and by default it uses LDView. So, the image quality should be the same (assuming you're not using POV; and if you're using POV, it should be better, but without edge lines, and really slow).

One thing you can do is create a preference set in LDView. I think you need to name it "LPub". If you have that preference set, LPub will (mostly) use the settings from that preference set. (I say mostly, because I think it forces certain settings, like edge lines.) So, you can then go into that preference set and enable things like antialiased lines. You can also make sure that "low quality studs" is disabled.
Thanks for your advise, I will try it tonight? By the way, are you also responsibility of LPub? Because I have some requirements...Smile
Quote:As far as I know, LPub can use either LDView or POV to generate it's images,
Current LPub version 4 works with either LDglite or LDView, but no longer POV.
Quote:By the way, are you also responsibility of LPub?
No he is not Wink We all have many suggestions but the project is no longer very active...
Quote:the pictures in LPub are not higher quality
In addition to Travis suggestions, maybe you need to increase image resolution? By default LPub uses a relatively low 150 dpi (configuration -> project setup). But increasing resolution causes longer processing time and bigger output files...
Travis Cobbs Wrote:If you send an email to the LDView email address, I'll try to get you a development build that includes a fix for this. Make sure to include what version of Mac OS X you're using in the email, if you send it.
Where is LDView email address?
Zhengrong Zang Wrote:Where is LDView email address?
ldview@gmail.com
Zhengrong Zang Wrote:
Travis Cobbs Wrote:If you send an email to the LDView email address, I'll try to get you a development build that includes a fix for this. Make sure to include what version of Mac OS X you're using in the email, if you send it.
Where is LDView email address?

Bear in mind, that even once Travis fixes this LDView bug ("shortcut" parts), you'll still likely get parts lists with missing part images.

I usually have images turned off anyway, but for testing I analysed some of my biggest models and found that every one of them had missing images, and while a few missing images were caused by this particular bug (e.g. motors, flags, etc.), the majority of the missing images were for a variety of other reasons:
  • Peeron using a different part number than LDraw for a given part
  • Peeron not having any image available for a given part
  • Peeron having an image available, but not at the expected address
  • Peeron not having an image in my chosen color, despite such a part/color truly existing
  • Peeron not having an image in my chosen color, because I used a color/part combo that may not exist in the real world (my fault)
  • Parts lists of models/sub-models where color 16 has been used
  • and so on...

Travis, as regards color 16, rather than generating a parts list with color -1 (as you presently do), would it not be better in this case to simply pick up the user's chosen "default" color on preferences/general? or make it an option...
Stephen Wrote:
Zhengrong Zang Wrote:
Travis Cobbs Wrote:If you send an email to the LDView email address, I'll try to get you a development build that includes a fix for this. Make sure to include what version of Mac OS X you're using in the email, if you send it.
Where is LDView email address?

Bear in mind, that even once Travis fixes this LDView bug ("shortcut" parts), you'll still likely get parts lists with missing part images.

I usually have images turned off anyway, but for testing I analysed some of my biggest models and found that every one of them had missing images, and while a few missing images were caused by this particular bug (e.g. motors, flags, etc.), the majority of the missing images were for a variety of other reasons:
  • Peeron using a different part number than LDraw for a given part
  • Peeron not having any image available for a given part
  • Peeron having an image available, but not at the expected address
  • Peeron not having an image in my chosen color, despite such a part/color truly existing
  • Peeron not having an image in my chosen color, because I used a color/part combo that may not exist in the real world (my fault)
  • Parts lists of models/sub-models where color 16 has been used
  • and so on...

Travis, as regards color 16, rather than generating a parts list with color -1 (as you presently do), would it not be better in this case to simply pick up the user's chosen "default" color on preferences/general? or make it an option...
Thanks for your message. In fact, I hope that I can resort parts list on web page, if I click on title quantity, the parts list will be resorted by quantity from high to low, is this possible?
Zhengrong Zang Wrote:Thanks for your message. In fact, I hope that I can resort parts list on web page, if I click on title quantity, the parts list will be resorted by quantity from high to low, is this possible?

No, it only sorts by part number presently.
Note: I would have answered the questions directed at me, but as far as I can tell, they have all been answered (correctly) by others. Please reply to this if I missed something.
Zhengrong Zang Wrote:In fact, I hope that I can resort parts list on web page, if I click on title quantity, the parts list will be resorted by quantity from high to low, is this possible?

As I previously stated, LDView doesn't currently provide for sorting by anything other than the part number. But I've got a number of scripts lying around that do various things with an LDView Parts List html file, one of which is a javascript bookmarklet that provides for the ability to re-sort the parts list on demand.

This is just a quick and dirty hack - don't expect it to be perfect. I've mainly tested it with slightly older versions of Firefox/Chrome/Opera, and it should work on most browsers, except probably Internet Explorer (which I don't use).

To set it up:
Visit http://pastebin.com/m0e9yGxM
(I can't post the script here because this forum damages the script (even using "quote" or "code")).
Carefully copy the entire contents of the RAW Paste Data box to your clipboard.
Create a new bookmark in your browser.
Edit the properties of the bookmark.
Paste the copied script from above into the location/URL box.
Set the name to something useful, like "LDView Parts List Sorter".
Save the bookmark.

To use it:
Open an LDView parts list html file in the browser.
Click on the bookmark, and enter a number from 1 to 4 or -1 to -4 to re-sort the parts list.

It should re-sort using the selected field as the sort index. You can only use a field if you had LDView output that column to the parts list in the first place. You might also be able to use dual-index sorting. If you sort by color then again by description, you get a different result to sorting by quantity then description because it is sorting the result of the previous sort - but that may not entirely work as expected across all browsers. Hitting Reload will return to the original LDView generated sort order.

You should be able to print or screenshot your altered parts list. Unfortunately, you probably won't be able to use File/SavePageAs to save the re-sorted playlist because that will just save another copy of the original (but if you have Chris Pederick's Web Developer add-on installed then you can use its View Generated Source followed by a Save to save the newly sorted parts list).

Let me know if you try it, if it works, or if you have problems (mention which browser you use and what went wrong). It certainly works for me with LDView 4.1 parts lists.
Stephen Wrote:
Zhengrong Zang Wrote:In fact, I hope that I can resort parts list on web page, if I click on title quantity, the parts list will be resorted by quantity from high to low, is this possible?

As I previously stated, LDView doesn't currently provide for sorting by anything other than the part number. But I've got a number of scripts lying around that do various things with an LDView Parts List html file, one of which is a javascript bookmarklet that provides for the ability to re-sort the parts list on demand.

This is just a quick and dirty hack - don't expect it to be perfect. I've mainly tested it with slightly older versions of Firefox/Chrome/Opera, and it should work on most browsers, except probably Internet Explorer (which I don't use).

To set it up:
Visit http://pastebin.com/m0e9yGxM
(I can't post the script here because this forum damages the script (even using "quote" or "code")).
Carefully copy the entire contents of the RAW Paste Data box to your clipboard.
Create a new bookmark in your browser.
Edit the properties of the bookmark.
Paste the copied script from above into the location/URL box.
Set the name to something useful, like "LDView Parts List Sorter".
Save the bookmark.

To use it:
Open an LDView parts list html file in the browser.
Click on the bookmark, and enter a number from 1 to 4 or -1 to -4 to re-sort the parts list.

It should re-sort using the selected field as the sort index. You can only use a field if you had LDView output that column to the parts list in the first place. You might also be able to use dual-index sorting. If you sort by color then again by description, you get a different result to sorting by quantity then description because it is sorting the result of the previous sort - but that may not entirely work as expected across all browsers. Hitting Reload will return to the original LDView generated sort order.

You should be able to print or screenshot your altered parts list. Unfortunately, you probably won't be able to use File/SavePageAs to save the re-sorted playlist because that will just save another copy of the original (but if you have Chris Pederick's Web Developer add-on installed then you can use its View Generated Source followed by a Save to save the newly sorted parts list).

Let me know if you try it, if it works, or if you have problems (mention which browser you use and what went wrong). It certainly works for me with LDView 4.1 parts lists.
I tried your bookmarket, only 4 is correct, 1-3 are not right, I need it is sorted by quantities, what can I do?
By the way, I tested it on Safari.
Pages: 1 2 3