LDraw.org Discussion Forums
[LDView] Snapshot and piping errors - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: [LDView] Snapshot and piping errors (/thread-24674.html)



Snapshot and piping errors - Michael Horvath - 2021-06-09

I am trying to use LDView to generate snapshots from the command line. The problem is, that models with errors cause a popup message to be spawned that I need to click through. Is there a way to pipe these error messages to a text file instead? They are important messages that I would like to read, but I don't want to stall the snapshot generation process since I have ~1k parts I need snapshots of.


RE: Snapshot and piping errors - Travis Cobbs - 2021-06-10

(2021-06-09, 22:12)Michael Horvath Wrote: I am trying to use LDView to generate snapshots from the command line. The problem is, that models with errors cause a popup message to be spawned that I need to click through. Is there a way to pipe these error messages to a text file instead? They are important messages that I would like to read, but I don't want to stall the snapshot generation process since I have ~1k parts I need snapshots of.

Can you send me one of your files that generates the popup? I don't think it's supposed to do that. Having said that, you might also try using LDView.com, although there is a bug in it that causes it not to work right when there are quoted spaces on the command line.


RE: Snapshot and piping errors - Michael Horvath - 2021-06-10

(2021-06-10, 1:38)Travis Cobbs Wrote: Can you send me one of your files that generates the popup? I don't think it's supposed to do that. Having said that, you might also try using LDView.com, although there is a bug in it that causes it not to work right when there are quoted spaces on the command line.

I attached the files to this post.

They are custom parts.

"a2341.dat" goes into the "parts\b\" folder.

"2431s01.dat" goes into the "parts\s\b" folder.

Mike


RE: Snapshot and piping errors - Michael Horvath - 2021-06-10

(2021-06-10, 1:38)Travis Cobbs Wrote: Can you send me one of your files that generates the popup? I don't think it's supposed to do that. Having said that, you might also try using LDView.com, although there is a bug in it that causes it not to work right when there are quoted spaces on the command line.

The development version seems to work better. But how do I pipe/redirect the messages to a text file?

I tried this:

"C:\Program Files (x86)\LDraw\LDView\LDView.com" -SaveSnapshots=1 a0902.dat >> ldview_snapshot.log

But the log file is empty.


RE: Snapshot and piping errors - Travis Cobbs - 2021-06-10

Thanks. I had totally forgotten about implementing that message box. A couple of things:

  1. If you use LDView.com (which hopefully works correctly in the fixed build I sent you), then you won't get this message box, and the errors will show up in the command prompt, able to be redirected to a file.
  2. I have updated LDView so that in the actual release, it will only show this message box if you don't use LDView.com and you specify -ShowErrorsMessageBox=1 (either on the command line or via the registry). LDView.com is definitely the recommended way to interact with LDView on the command line in Windows for LDView 4.4.



RE: Snapshot and piping errors - Michael Horvath - 2021-06-10

(2021-06-10, 6:18)Travis Cobbs Wrote: Thanks. I had totally forgotten about implementing that message box. A couple of things:

  1. If you use LDView.com (which hopefully works correctly in the fixed build I sent you), then you won't get this message box, and the errors will show up in the command prompt, able to be redirected to a file.
  2. I have updated LDView so that in the actual release, it will only show this message box if you don't use LDView.com and you specify -ShowErrorsMessageBox=1 (either on the command line or via the registry). LDView.com is definitely the recommended way to interact with LDView on the command line in Windows for LDView 4.4.

See my other post from yesterday. I am having trouble getting the redirection to work on Windows.


RE: Snapshot and piping errors - Travis Cobbs - 2021-06-10

(2021-06-10, 3:56)Michael Horvath Wrote: The development version seems to work better. But how do I pipe/redirect the messages to a text file?

I tried this:

"C:\Program Files (x86)\LDraw\LDView\LDView.com" -SaveSnapshots=1 a0902.dat  >> ldview_snapshot.log

But the log file is empty.

This appears to be caused by a misunderstanding on my part regarding a certain Windows API call. I should be able to fix it.


RE: Snapshot and piping errors - Michael Horvath - 2021-06-11

I am now having a different problem:

After successfully executing LDView.com a certain number of times, I start getting "Access denied" errors.

After a few more repetitions, LDView.com disappears from my hard drive and I start getting "No such file or directory" errors instead.

I've never experienced something like this before. Is the program triggering Windows Firewall somehow and getting itself quarantined? I am not an expert on firewalls/antivirus.

[ed]

The new version you sent me seems to work propery.


RE: Snapshot and piping errors - Travis Cobbs - 2021-06-11

(2021-06-11, 1:54)Michael Horvath Wrote: I am now having a different problem:

After successfully executing LDView.com a certain number of times, I start getting "Access denied" errors.

After a few more repetitions, LDView.com disappears from my hard drive and I start getting "No such file or directory" errors instead.

I've never experienced something like this before. Is the program triggering Windows Firewall somehow and getting itself quarantined? I am not an expert on firewalls/antivirus.

[ed]

The new version you sent me seems to work propery.

I'm glad the new version works. I have no idea why the old version did that. I've never heard of anything like that either. I guess it could be Windows Security that deleted the file, but I have no idea why it would do so.