leAttachFig usage question

P

PolyPusher

Guest
Hi All,

Hopefully this is an easy one. I am trying to create a "text" layer
label with dbCreateLabel on top of the pin label(so I can see it
easier) this part is working fine(it is an adaptation of Andrews code
he gave me). The second part I want to attach the text to the pin it
is on top of(make it a child.

This is the code I tried:

leAttachFig(label dbGetq(term~>pins fig))

Where "term" is from foreach(mapcar term cvpinID~>terminals

The error message is:

*Error* leAttachFig: argument #2 should be a database object (type
template = "dd") - (db:66176408)

I do not understand this error or how to fix it ;)

Any and all help is welcome.
Thank you in advance,
PolyPusher
 
PolyPusher wrote, on 01/05/10 15:57:
Hi All,

Hopefully this is an easy one. I am trying to create a "text" layer
label with dbCreateLabel on top of the pin label(so I can see it
easier) this part is working fine(it is an adaptation of Andrews code
he gave me). The second part I want to attach the text to the pin it
is on top of(make it a child.

This is the code I tried:

leAttachFig(label dbGetq(term~>pins fig))

Where "term" is from foreach(mapcar term cvpinID~>terminals

The error message is:

*Error* leAttachFig: argument #2 should be a database object (type
template = "dd") - (db:66176408)

I do not understand this error or how to fix it ;)

Any and all help is welcome.
Thank you in advance,
PolyPusher
Hi Eric,

The problem is that you've passed a list of figures, rather than a single figure
(which is what it is expecting).

term~>pins is a list of pins, and so term~>pins~>fig (which is what you're
doing) is also a list. If there's only a single pin, doing car(term~>pins)~>fig
would do the job.

You can see from the error that it has a list of database objects (the
surrounding parentheses are the clue).

Regards,

Andrew.
 
On Jan 6, 9:41 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
PolyPusher wrote, on 01/05/10 15:57:





Hi All,

Hopefully this is an easy one.   I am trying to create a "text" layer
label with dbCreateLabel on top of the pin label(so I can see it
easier) this part is working fine(it is an adaptation of Andrews code
he gave me).   The second part I want to attach the text to the pin it
is on top of(make it a child.

This is the code I tried:

leAttachFig(label dbGetq(term~>pins fig))

Where "term" is from foreach(mapcar term cvpinID~>terminals

The error message is:

*Error* leAttachFig: argument #2 should be a database object (type
template = "dd") - (db:66176408)

I do not understand this error or how to fix it ;)

Any and all help is welcome.
Thank you in advance,
PolyPusher

Hi Eric,

The problem is that you've passed a list of figures, rather than a single figure
(which is what it is expecting).

term~>pins is a list of pins, and so term~>pins~>fig (which is what you're
doing) is also a list. If there's only a single pin, doing car(term~>pins)~>fig
would do the job.

You can see from the error that it has a list of database objects (the
surrounding parentheses are the clue).

Regards,

Andrew.
Andrew,

I see the issue clearly. I should have caught that one.
A lot to learn.

Thank you very much,
Eric
 

Welcome to EDABoard.com

Sponsor

Back
Top