EAGLE Central Forums
Where the EAGLE community meets. Sponsored by Stratford Digital.

Home » CadSoft Support Forums » eagle.support.eng » Designlink possible with Farnell (Europe) ordercodes?
Designlink possible with Farnell (Europe) ordercodes? [message #152555] Sun, 06 October 2013 16:26 Go to next message
Joop14
Messages: 99
Registered: June 2013
Member
Hello,

I tried to use the Designlink button in Eagle but it seems to work only
with Newark.
Because I'm located in Europe, is it possible to use Designlink with the
Farnell database instead?
The ordercodes generated by Newark don't seem to be accepted by the
Farnell (Europe) website.

Thanks in advance,

Joop

--
To view any images and attachments in this post, visit:
http://www.element14.com/community/message/90700#90700
Re: Designlink possible with Farnell (Europe) ordercodes? [message #152563 is a reply to message #152555] Mon, 07 October 2013 18:22 Go to previous messageGo to next message
Jorge Garcia
Messages: 1291
Registered: April 2010
Senior Member
On 10/6/2013 12:38 PM, Joop14 wrote:
> Hello,
>
> I tried to use the Designlink button in Eagle but it seems to work only
> with Newark.
> Because I'm located in Europe, is it possible to use Designlink with the
> Farnell database instead?
> The ordercodes generated by Newark don't seem to be accepted by the
> Farnell (Europe) website.
>
> Thanks in advance,
>
> Joop
>
> --
> To view any images and attachments in this post, visit:
> http://www.element14.com/community/message/90700#90700
>
Hi Joop,

I hope you're doing well. This is possible, you're going to have to get
your hands a little dirty but it's possible.

1. Open up the designlink-inc.ulp file included with EAGLE for editing.
2. On line 17 you're going to find a string variable called DILanguage
whose value is assigned by a function called language(), remember it
we're going to go back to it.
3. Starting on line 247 you're going to find a list of Country codes.
Find the two-letter symbol for your country.
4. Go back to line 17, and we're going to hard code you're country.
Comment out the language() function call. Then type in the two-letter
code you found in step 3 within double quotes.

Save the designlink-inc.ulp. Now next time you run Designlink if should
find the correct information.

Let me know if there's anything else I can do for you.

Best Regards,
Jorge Garcia
Re: Designlink possible with Farnell (Europe) ordercodes? [message #152594 is a reply to message #152563] Wed, 09 October 2013 11:48 Go to previous messageGo to next message
CadSoft Support
Messages: 538
Registered: September 2006
Senior Member
On 07.10.2013 20:35, Jorge Garcia wrote:
> On 10/6/2013 12:38 PM, Joop14 wrote:
>> Hello,
>>
>> I tried to use the Designlink button in Eagle but it seems to work only
>> with Newark.
>> Because I'm located in Europe, is it possible to use Designlink with the
>> Farnell database instead?
>> The ordercodes generated by Newark don't seem to be accepted by the
>> Farnell (Europe) website.
>>
>> Thanks in advance,
>>
>> Joop
>>
>> --
>> To view any images and attachments in this post, visit:
>> http://www.element14.com/community/message/90700#90700
>>
> Hi Joop,
>
> I hope you're doing well. This is possible, you're going to have to get
> your hands a little dirty but it's possible.
>
> 1. Open up the designlink-inc.ulp file included with EAGLE for editing.
> 2. On line 17 you're going to find a string variable called DILanguage
> whose value is assigned by a function called language(), remember it
> we're going to go back to it.
> 3. Starting on line 247 you're going to find a list of Country codes.
> Find the two-letter symbol for your country.
> 4. Go back to line 17, and we're going to hard code you're country.
> Comment out the language() function call. Then type in the two-letter
> code you found in step 3 within double quotes.
>
> Save the designlink-inc.ulp. Now next time you run Designlink if should
> find the correct information.
>
> Let me know if there's anything else I can do for you.
>
> Best Regards,
> Jorge Garcia


Hi Jorge,

I think it is also possible to set the environment variable
for LANG for example to en_GB. This should contact the UK
Farnell server.


--
Mit freundlichen Gruessen / Best regards
Richard Hammerl
CadSoft Support -- hotline@cadsoft.de
FAQ: http://www.cadsoft.de/training/faq/
Re: Designlink possible with Farnell (Europe) ordercodes? [message #152599 is a reply to message #152594] Wed, 09 October 2013 18:18 Go to previous messageGo to next message
Jorge Garcia
Messages: 1291
Registered: April 2010
Senior Member
Thanks Richard,

Best Regards,
Jorge Garcia
Re: Designlink possible with Farnell (Europe) ordercodes? [message #152695 is a reply to message #152555] Wed, 16 October 2013 15:40 Go to previous messageGo to next message
Jens Vanhoof
Messages: 5
Registered: October 2013
Junior Member
Hi guys,

I'm from Belgium and tried to do the modification of the file, but it
didn't seem to work. Perhaps I mistakenly did something wrong.
I have modified the file to this:

string DILanguage = "BE EUR 0 be.farnell.com";//language();

When I click the DesignLink button in Eagle, if gives me the following
warning:
Error while accessing
'https://api.element14.com/pffind/services/SearchService':

299 Error downloading
https://api.element14.com/pffind/services/SearchService?callinfo.apiKey=sf4 kqy6u29tkt95gg5a3wejz
- server replied: Bad Request

<h1>Bad Request</h1>

Any ideas? I would love to have access to the belgian farnell database
as well. :)

Thanks a lot,
Jens

--
To view any images and attachments in this post, visit:
http://www.element14.com/community/message/91677#91677
Re: Designlink possible with Farnell (Europe) ordercodes? [message #152701 is a reply to message #152695] Wed, 16 October 2013 19:44 Go to previous messageGo to next message
Jorge Garcia
Messages: 1291
Registered: April 2010
Senior Member
On 10/16/2013 11:58 AM, Jens Vanhoof wrote:
> Hi guys,
>
> I'm from Belgium and tried to do the modification of the file, but it
> didn't seem to work. Perhaps I mistakenly did something wrong.
> I have modified the file to this:
>
> string DILanguage = "BE EUR 0 be.farnell.com";//language();

Hi Jens,

The string DILanguage variable should only have the two letter reference
so in this case it would be:

string DILanguage= "BE";//language();

hth,
Jorge Garcia
Cadsoft Support
Re: Designlink possible with Farnell (Europe) ordercodes? [message #152707 is a reply to message #152555] Thu, 17 October 2013 07:10 Go to previous messageGo to next message
Jens Vanhoof
Messages: 5
Registered: October 2013
Junior Member
Hi Jorge,

Thanks for the response. I tried your suggestion but exactly the same
error pops up. Is it normal that, even with DILanguage set to "BE",
Eagle still tries to contact api.element14.com?
I tried to set DICountry also to BE, but the same problem remains. (I
restarted EAGLE when I modified the configuration file.

Any other suggestions? As a reference, I uploaded the file as it is now
to here: www.jensvanhoof.be/designlink-inc.ulp

Thanks!

--
To view any images and attachments in this post, visit:
http://www.element14.com/community/message/91753#91753
Re: Designlink possible with Farnell (Europe) ordercodes? [message #152834 is a reply to message #152555] Mon, 28 October 2013 13:10 Go to previous messageGo to next message
Martin Havranek
Messages: 1
Registered: October 2013
Junior Member
Hi Jorge,
I'm having exactly the same problem here. All options have been tried
but I cannot get into the Dutch ("NL") Farnell store. Only into Newark.

Any further suggestions on how to solve this?

Thanks,
Martin

--
To view any images and attachments in this post, visit:
http://www.element14.com/community/message/92871#92871
Re: Designlink possible with Farnell (Europe) ordercodes? [message #153280 is a reply to message #152707] Mon, 16 December 2013 15:22 Go to previous messageGo to next message
Lieven Hollevoet
Messages: 12
Registered: December 2013
Junior Member
Jens,

I am experiencing the same problem you have. I got the script to
recognize the correct country by copying the 3 designlink ULP files to a
separate folder, then making the change to desiglink-inc.ulp

DIcountry = "BE";

(Note, making the change to 'language' does not seem to work).

Then run the script designlink-order.ulp from the folder you copied the
scripts to. The script then at least tries to connect to the service
defined for Belgium. I verified this by adding a debug print statement
in the designlink-inc.ulp InitCountryData function.

Unfortunately I then get an error:

Error while accessing
'https://api.element14.com/pffind/services/SearchService':

299 Error downloading
https://api.element14.com/pffind/services/SearchService?callinfo.apiKey=<snip>
- server replied: Bad Request

<h1>Bad Request</h1>

So apparently this functionality is broken for Belgium. You can get it
partially working by changing the DIcountry to "UK", note that you get
price in pounds then but at least the order codes seem to be correct.

@jorge can you please check why designlink is not working for country
code "BE"? I guess there is some configuration on the API server that
does not allow request with the country code "BE".

Kind regards,
Lieven.

--
To view any images and attachments in this post, visit:
http://www.element14.com/community/message/97432
Re: Designlink possible with Farnell (Europe) ordercodes? [message #155235 is a reply to message #152563] Tue, 06 May 2014 16:51 Go to previous messageGo to next message
Eystein Orsnes
Messages: 1
Registered: May 2014
Junior Member
Good Lord, why does which country you live in even matter? Isn't this
just about accessing a database to identify the parts you want? I live
in Norway, so yeah, guess I will have to wait long and hard before I get
to be included... Edited the script as described, but didn't work... Why
exactly can't we just access Newark?

--
To view any images and attachments in this post, visit:
http://www.element14.com/community/message/111740
Re: Designlink possible with Farnell (Europe) ordercodes? [message #155238 is a reply to message #155235] Tue, 06 May 2014 19:15 Go to previous messageGo to next message
Jorge Garcia
Messages: 1291
Registered: April 2010
Senior Member
On 5/6/2014 12:51 PM, Eystein Orsnes wrote:
> Good Lord, why does which country you live in even matter? Isn't this
> just about accessing a database to identify the parts you want? I live
> in Norway, so yeah, guess I will have to wait long and hard before I get
> to be included... Edited the script as described, but didn't work... Why
> exactly can't we just access Newark?

The country matters because Designlink want to show pricing in your
local currency. Setting the country code to the US code should allow you
to check Newark's inventory.

hth,
Jorge Garcia
Re: Designlink possible with Farnell (Europe) ordercodes? [message #169911 is a reply to message #152834] Sat, 04 March 2017 17:01 Go to previous message
Bozzer Joseph
Messages: 1
Registered: March 2017
Junior Member
Hi Martin
I found the solution

Juste change this line as follow and all will work :
string DISearchURL = "be.farnell.com"; // Unified to one URL since May 12

Best regards

--
To view any images and attachments in this post, visit:
https://www.element14.com/community/message/217458
Previous Topic: Wanted - PC borad or example schematics
Next Topic: I'am looking for a courses of Eagle.
Goto Forum:
  


Current Time: Sat May 27 17:26:43 GMT 2017