Welcome! Log In Create A New Profile

Advanced
Re: Insert Related Database
avatarApril 18, 2013 09:51PM
I'm not sure if names are necessary or not.

Having said that, one thing I didn't notice when I initially looked at your file is that I would argue that it goes against best practices for meta-commands. If you feel it is necessary to introduce new meta-commands to make this work, ideally you should only introduce a single one, and have it have one ENUM argument and then optional info after that. The LDraw spec states that you should use the program name of your program, but since you're trying to make this useful for everyone, that doesn't seem appropriate. However, I still feel that it's better to have related functionality be grouped under a single meta-command, instead of two like you have. It makes it obvious that the statements are related.

For example, you could do the following:

0 !RELATION PARENT
1 4	0 0 0	1 0 0 0 1 0 0 0 1 122c01.dat
1 4	0 0 0	1 0 0 0 1 0 0 0 1 122c02.dat
0 !RELATION CHILD Left Tire
1 1	-31.000000 6.000000 0.000000	0.000000 0.000000 1.000000  0.000000 1.000000 0.000000  -1.000000 0.000000 0.000000  3641.dat
1 1	-31.000000 6.000000 0.000000	-0.000000 0.000000 1.000000  -0.000000 1.000000 -0.000000  -1.000000 -0.000000 -0.000000  4084.dat
0 !RELATION PARENT
1 4	100 0 0	1 0 0 0 1 0 0 0 1 122c01.dat
1 4	100 0 0	1 0 0 0 1 0 0 0 1 122c02.dat
0 !RELATION CHILD Right Tire
1 1	131.000000 6.000000 0.000000	-0.000000 0.000000 -1.000000  -0.000000 1.000000 -0.000000  1.000000 0.000000 -0.000000  3641.dat
1 1	131.000000 6.000000 0.000000	-0.000000 0.000000 -1.000000  -0.000000 1.000000 -0.000000  1.000000 0.000000 -0.000000  4084.dat

In the above, you would be introducing the !RELATION meta-command. PARENT and CHILD are required as the first argument, and every other argument after CHILD is the child's name. At least two current official meta-commands behave like this (BFC and !TEXMAP).
SubjectAuthorViewsPosted
Insert Related Database Ben Supnik1009March 31, 2013 01:35PM
Re: Insert Related Database Roland Melkert456April 01, 2013 10:04AM
Re: Insert Related Database Philippe Hurbain502April 02, 2013 12:14AM
Re: Insert Related Database Ben Supnik461April 02, 2013 08:10AM
Re: Insert Related Database Steffen399April 14, 2013 05:50AM
Re: Insert Related Database Ben Supnik378April 14, 2013 07:38AM
Re: Insert Related Database Steffen389April 14, 2013 09:23AM
Re: Insert Related Database Ben Supnik390April 14, 2013 08:47PM
Re: Insert Related Database Travis Cobbs472April 14, 2013 09:30PM
Re: Insert Related Database Ben Supnik399April 15, 2013 07:39PM
Re: Insert Related Database Allen Smith419April 15, 2013 09:26AM
Re: Insert Related Database Sergio Reano410April 17, 2013 05:09AM
Re: Insert Related Database Ben Supnik402April 17, 2013 07:00AM
Re: Insert Related Database Sergio Reano389April 17, 2013 07:20AM
Re: Insert Related Database Steffen452April 17, 2013 04:26PM
Re: Insert Related Database Allen Smith464April 18, 2013 08:43AM
Re: Insert Related Database Roland Melkert414April 18, 2013 10:03AM
Re: Insert Related Database Ben Supnik422April 18, 2013 05:21PM
Re: Insert Related Database Travis Cobbs442April 18, 2013 09:51PM
Re: Insert Related Database Ben Supnik436April 19, 2013 11:14AM
Re: Insert Related Database Roland Melkert407April 19, 2013 11:24AM
Re: Insert Related Database Travis Cobbs404April 19, 2013 11:32AM
Re: Insert Related Database Roland Melkert426April 19, 2013 11:45AM
Re: Insert Related Database Tim Gould386April 19, 2013 02:29PM
Re: Insert Related Database Ben Supnik425April 19, 2013 07:04PM
Re: Insert Related Database Travis Cobbs406April 19, 2013 11:27AM
Re: Insert Related Database Steffen424December 11, 2013 09:22PM



Sorry, only registered users may post in this forum.

Click here to login