LDraw.org Discussion Forums

Full Version: Bulk change headers in MPD
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all,

What tool can help me change all headers of 200+ submodels in bulk?
I have been somewhat untidy in creating those and consequently uniform all headers.

Can LDCad do it with a script? I thought I read that somewhere.

MPDCenter can I believe but won't load my file.

Thanks.

Jaco
(2019-11-22, 11:39)Jaco van der Molen Wrote: [ -> ]MPDCenter can I believe but won't load my file.
Jaco, did you got my email? The problem you've got with your mpd and LeoCAD comes from duplicated 0 NOFILE statements - and it seems to cause problem with MPDCenter too, the corrected file loads fine here.
...and btw, maybe this kind of MPD structure issue (duplicated NOFILE) could be catch up and corrected by LDCad cleanup?
(2019-11-22, 12:11)Philippe Hurbain Wrote: [ -> ]Jaco, did you got my email? The problem you've got with your mpd and LeoCAD comes from duplicated 0 NOFILE statements - and it seems to cause problem with MPDCenter too, the corrected file loads fine here.

I got your mail in my spam box (curious) and saw it! The NOFILE is from LPub3D, right?
I'll try tonight.
(2019-11-22, 17:37)Jaco van der Molen Wrote: [ -> ]I got your mail in my spam box (curious) and saw it! The NOFILE is from LPub3D, right?
I'll try tonight.
Dunno the origin of that problem...
(2019-11-22, 12:17)Philippe Hurbain Wrote: [ -> ]...and btw, maybe this kind of MPD structure issue (duplicated NOFILE) could be catch up and corrected by LDCad cleanup?

The duplicate NOFILE will be ignored during loading (generates a warning in the logfile).

The internals will handle it as 'unknown/garbage' content which is preserved for forwards compatibility's sake but otherwise totally ignored.

In short the cleanup will do nothing to fix it as these lines are hidden to it Smile
(2019-11-22, 12:11)Philippe Hurbain Wrote: [ -> ]Jaco, did you got my email? The problem you've got with your mpd and LeoCAD comes from duplicated 0 NOFILE statements - and it seems to cause problem with MPDCenter too, the corrected file loads fine here.

What does NOFILE do anyway?
(2019-11-22, 23:38)Roland Melkert Wrote: [ -> ]The duplicate NOFILE will be ignored during loading (generates a warning in the logfile).

The internals will handle it as 'unknown/garbage' content which is preserved for forwards compatibility's sake but otherwise totally ignored.

In short the cleanup will do nothing to fix it as these lines are hidden to it Smile

Ok. Is there a way to make all headers uniform in LDCad?
Be cause Mpdcenter still does not load my file.
And is there a way to make the names of sub files the same as description?
sometimes I forgot to check those options on creating new sub files
(2019-11-23, 8:49)Jaco van der Molen Wrote: [ -> ]What does NOFILE do anyway?
AFAIK it's an end of file inside the mpd multi-(embedded) files structure. Somewhat redundant since a new 0 FILE is enough to mark the start of a new file and end of previous one (mpd is not recursive). Probably some parsers tries to treat that recursively and consider the second NOFILE as an end of main file.
(2019-11-22, 11:39)Jaco van der Molen Wrote: [ -> ]What tool can help me change all headers of 200+ submodels in bulk?
I believe some of advanced text editors would help. I'd choose 'vim', it's easy (for me) to write a macro doing this there. But any advanced text editor working with plain TXT format would help (not WYSIWYG proccesors putting "invissible" binary mess into the text).
Pages: 1 2