DIYLC component template

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

DIYLC component template

rocket88
Administrator
Question unrelated to stompboxes, but I want to create new components in DIYLC, but for some reason I can't figure it out. The reason being is I want to make some of the components look more like they do in real life, like marks does for his layouts in v2. I have the code, but don't know where to go from there.

Mark gave me his component library, but it can't just be imported, and I tried importing them there and couldn't get it to go in, so I just want to figure out how to put the code into v3 so I can just continue using what I'm used to.

Anyone that can help a brother out, would be much appreciated.
Reply | Threaded
Open this post in threaded view
|

RE: DIYLC component template

Chris60601
I too tried some way of importing them. And sadly, the homepage offers zero help on that. So, I just opted to use the old version of the software.

From: [hidden email]
Sent: ‎2/‎28/‎2015 3:34 PM
To: [hidden email]
Subject: DIYLC component template

Question unrelated to stompboxes, but I want to create new components in DIYLC, but for some reason I can't figure it out. The reason being is I want to make some of the components look more like they do in real life, like marks does for his layouts in v2. I have the code, but don't know where to go from there.

Mark gave me his component library, but it can't just be imported, and I tried importing them there and couldn't get it to go in, so I just want to figure out how to put the code into v3 so I can just continue using what I'm used to.

Anyone that can help a brother out, would be much appreciated.


If you reply to this email, your message will be added to the discussion below:
http://guitar-fx-layouts.42897.x6.nabble.com/DIYLC-component-template-tp18133.html
To start a new topic under Open Chat, email [hidden email]
To unsubscribe from Guitar FX Layouts, click here.
NAML
Yeah, 220, 221. Whatever it takes.
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

IvIark
Administrator
In reply to this post by rocket88
With V2 I just frigged about with the individual library XML files, changing parameter values in the main drawInstructions tags, seeing what those changes did and then altering them until it looked and did exactly what I wanted.

I haven't used V3 very much but I have made a few custom components to save me having to change colours all the time, so I have one for Panasonic caps for instance, and metal film and carbon film resistor symbols for 1/4W and 1/8W which closely match the ones I use in V2.  The information that you set for the custom components is saved in a file in the root of the program called config.xml, so that would be the one to get the info from if you wanted contributions to build a custom library.

So this is my Panasonic code for instance:


        <string>Passive.Ceramic Capacitor (radial)</string>
        <list>
          <org.diylc.core.Template>
            <name>Panasonic</name>
            <values>
              <entry>
                <string>Value</string>
                <null/>
              </entry>
              <entry>
                <string>Pin spacing</string>
                <org.diylc.core.measures.Size>
                  <value>0.1</value>
                  <unit class="org.diylc.core.measures.SizeUnit">in</unit>
                </org.diylc.core.measures.Size>
              </entry>
              <entry>
                <string>Alpha</string>
                <byte>127</byte>
              </entry>
              <entry>
                <string>Border</string>
                <awt-color>
                  <red>153</red>
                  <green>0</green>
                  <blue>51</blue>
                  <alpha>255</alpha>
                </awt-color>
              </entry>
              <entry>
                <string>Voltage</string>
                <null/>
              </entry>
              <entry>
                <string>Length</string>
                <org.diylc.core.measures.Size>
                  <value>0.25</value>
                  <unit class="org.diylc.core.measures.SizeUnit">in</unit>
                </org.diylc.core.measures.Size>
              </entry>
              <entry>
                <string>Display</string>
                <org.diylc.common.Display>NAME</org.diylc.common.Display>
              </entry>
              <entry>
                <string>Width</string>
                <org.diylc.core.measures.Size>
                  <value>0.125</value>
                  <unit class="org.diylc.core.measures.SizeUnit">in</unit>
                </org.diylc.core.measures.Size>
              </entry>
              <entry>
                <string>Lead color</string>
                <awt-color>
                  <red>204</red>
                  <green>204</green>
                  <blue>204</blue>
                  <alpha>255</alpha>
                </awt-color>
              </entry>
              <entry>
                <string>Label color</string>
                <awt-color>
                  <red>255</red>
                  <green>255</green>
                  <blue>255</blue>
                  <alpha>255</alpha>
                </awt-color>
              </entry>
              <entry>
                <string>Color</string>
                <awt-color>
                  <red>204</red>
                  <green>0</green>
                  <blue>51</blue>
                  <alpha>255</alpha>
                </awt-color>
              </entry>
            </values>
            <points>
              <java.awt.Point>
                <x>0</x>
                <y>0</y>
              </java.awt.Point>
              <java.awt.Point>
                <x>0</x>
                <y>80</y>
              </java.awt.Point>
            </points>
          </org.diylc.core.Template>
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

rocket88
Administrator
Great mark, thanks. How do you get to the place to input the code? That's where I'm getting lost. I'm hoping I can change the look of the resistors of electrolytics mostly, as they just look off.
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

IvIark
Administrator
Well I made all the parts in the program by changing colours and sizes etc, click on the item to select and then click on Edit > Save as template.  Then the new component appears in a drop down list that you get to by clicking the arrow to the right hand side of the parent product in the icon menu.  But once you do that the template for that component is saved in the config.xml file, so there's nothing to stop you adding to that file directly by just opening it in notepad and copying and pasting.

If you want to look at other peoples creations then just ask for their config.xml and add a few things to your own file.
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

IvIark
Administrator
config.xml

This is my config.xml if you want a play.  Like I said though I haven't made much, just a few caps, resistors, a trimmer, different coloured wire and a vero board.  
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

rocket88
Administrator
In reply to this post by IvIark
Awesome. Yea, I've made some caps and diodes by changing the colors and size, etc. what Ike wondering is if possible to change the actual shape or complete looks of the resistors and such like how they are in v2, because they look realistic.

Now, Ive opened the XML file, if I copy that info into notepad, can I save it as a XML file? How do I then get it into DIYLC?

I actually can't believe I'm having such issues with this. I feel like an idiot.


Btw, mark I hope I didn't sound snarky before.
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

Chris60601
Is there that much of a benefit using the new version opposed to the old? It almost seems like the trouble may not be worth the time etc.
Just wondering.
Yeah, 220, 221. Whatever it takes.
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

rocket88
Administrator
I think it's just some of the quarks of v2 vs v3. Not that ones better then the other, just different is all.

Some of the things that annoy me about v2 is the resolution, and that when you click to add a part and it puts it onto the layout area rather then being able to click on the board whee you want it to start and then you can place the other leg where you want to on the board.

In all honestly, if I can't do what I'm thinking then no worries. If I could make the changes to the components in v3, then I could have my cake and eat it too. Keep the interface I'm used to and have my layouts look more realistic and similar to marks.
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

IvIark
Administrator
In reply to this post by rocket88
The problem is that V3 uses different markup than V2, and although I'm sure it is possible to create the curves, without the code from an existing component to use as a template, we just have no way of knowing what the software expects to see and how it is interpreted.

The resolution is the biggest annoyance with V2 for me too, plus I hate that CTRL + X closes it down without any confirmation required which has got me on the verge of throwing my keyboard through a window on a few occasions.  But I actually prefer the way the components are placed, so a bit of magnifications in Windows is enough for me to get over the worst of it.  It may be worth sending an email to Bancika to see if he has any documentation to support creation of new components for things like more complicated shapes etc for custom components.

There is this:

http://code.google.com/p/diy-layout-creator/wiki/ComponentAPI

But it looked a lot more work than I wanted to put into it, just to negotiate the learning curve.
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

rocket88
Administrator
Yea I found that two and i just got lost. I've been thinking about sending him an email to see if what I'm thinking is possible, and if so how to go about it. It's not that big a deal to deal with, just would be nice to have the components mimic what we really use. I'll see if Bancika has any ideas and go from there. If it's possible, I'll let everyone know.

Mark do you know if there's a way to change that change that when you place a component in v2 it doesn't just automatically place a component in the middle of the board, but be able to place it where I want right away like in v3?
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

IvIark
Administrator
I always drag the component from the menu to the position I want it and that works fine.  Of course you may still need to change the number of rows it spans but at least it's in the right place
Reply | Threaded
Open this post in threaded view
|

Re: DIYLC component template

tabbycat
am wanting to upgrade from the version of diylc which has the component values listed off the layout to the one which puts the component values in the component symbols themselves. i think that means i have v1 and want v2 or v3. v2 seems to be somwhat decomissioned at diylc hq.

am not the most computer literate person and attempts to uprade to diylc 3.28.0 just seem to stall. i get a message about needing java 1.0.6_10. i go to install java but it never seems to install, either directly from the site or downloading the whole thing to desktop and trying to open there.

the version 1 (with values in a list not in components) i have on my desktop and works fine, so i would have thought that my system was up to it. since the install v3 thing is not happening no matter what i try, is there a simple way i can just turn v1 into any of the newer ones by tweaking something in the program folders?
i have the whole 3.28 folder with all the sub-folders and bits in it on my desktop but it won't install whole without java, which refuses to install period. i have admin rights etc. just won't react to clicking.

bit stuck if anyone would care to advise?

or if you have or know of any version of diylc with the component values in the components that will work on vista (cross-referencing lists of component values just makes things too complicated to follow with big layouts) a link would be v useful.

many thanks.