Bulk change headers in MPD


Bulk change headers in MPD
#1
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
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Bulk change headers in MPD
#2
(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.
Reply
mpd structure and LDCad file cleanup
#3
...and btw, maybe this kind of MPD structure issue (duplicated NOFILE) could be catch up and corrected by LDCad cleanup?
Reply
RE: mpd structure and LDCad file cleanup
#6
(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
Reply
RE: mpd structure and LDCad file cleanup
#8
(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
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: mpd structure and LDCad file cleanup
#11
(2019-11-23, 8:52)Jaco van der Molen Wrote: Is there a way to make all headers uniform in LDCad?

If it's a single mpd you could try the clean up feature found in the file menu.

Scripting could be an option if you don't mind working with the LDraw content as simple strings.

But it might be easier to use a decent text editor with macro support instead, like suggested below.
Reply
RE: Bulk change headers in MPD
#4
(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.
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Bulk change headers in MPD
#5
(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...
Reply
RE: Bulk change headers in MPD
#7
(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?
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Bulk change headers in MPD
#9
(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.
Reply
RE: Bulk change headers in MPD
#10
(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).
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)