Is this possible?
also, is it possible to set any of the attributes of the objects in the ULP api?
UL_WIRE x1,x2,y1,y2 for instance ? - it seems like its not, and I cant see how to use the MOVE command to move a wire around.
Thanks
Rob.
Is this possible?
also, is it possible to set any of the attributes of the objects in the ULP api?
UL_WIRE x1,x2,y1,y2 for instance ? - it seems like its not, and I cant see how to use the MOVE command to move a wire around.
Thanks
Rob.
Hi Rob
No,unfortunately. You can only read them. When you exit the ULP you run
commands directly in the editor from the final exit("commands string") or
fire off a script you can build and save from within your ULP calling the
script the same way i.e. exit(script 'MyScript'). The script will often
have speed advantages.
All the best with the Python approach. I'm interested to see what develops.
Warren
--
Web access to CadSoft support forums at www.eaglecentral.ca. Where the CadSoft EAGLE community meets.
Hi, thanks for getting back,
I currently do use the exit() to execute my scr, but I am unable to see how to move "wires" around with the scr. It seems only certain objects can be move with this command? or am I missing something?
Rob.
Hi, thanks for getting back,
I currently do use the exit() to execute my scr, but I am unable to see how to move "wires" around with the scr. It seems only certain objects can be move with this command? or am I missing something?
Rob.
Hi, thanks for
getting back,
I currently do use the exit() to execute my scr, but I am unable to see
how to move "wires" around with the scr. It seems only certain objects
can be move with this command? or am I missing something?
Rob.
You need to think 'how do I do it when in the editor?' as that's the limit
of your power.
Trouble is, wires have no names so you cannot refer to them by name.
In the editor you can MOVE a wire by clicking its ends or middle and drag
it.
You can put it into a group and move that group.
So your ULP needs to be identify these same points and replicate the same
actions. You can MOVE(current point)(new point)
e.g MOVE (0 0)(1 1)
Trouble is you need to be sure there is no other object at the pickup point
as that may be picked up. Sometimes you may need to hide the other layers.
Normally the precision of the specified points will assure that the desired
object point snaps to the cursor.
You have to remain aware that in the editor you cannot get at the wires in
an element(package). You need to manipulate those in the library. That
said, another option is to manipulate the XML of the board file. You still
have the challenge of identifying the wire.
Something that may work for you is this:
You could first put the wire of interest into a group by itself. you can
then detect that wire in the ULP as it is ingroup()
Eagle permits you to set up a context menu(right Click). See HELP >SET>
Context Menus. Set that up for a wire and it will be the only object
grouped at that time so you can detect the wire and discover its points.
Careful of routed traces as they look like wires but you cannot move the
end attached to a pin.
Again, practice what can be done manually in the editor to understand what
you can automate.
All the best
Warren
--
Web access to CadSoft support forums at www.eaglecentral.ca. Where the CadSoft EAGLE community meets.