Electronic – How to hide part names and values in EAGLE via ULP script

eagle

I am trying to automate the generation of different assembly versions of an EAGLE PCB layout. For this I need to hide components names and values. It seems to be impossible to get hold of the NAME and VALUE by use of the ATTRIBUTE command, since they seem to be protected:

CHANGE DISPLAY OFF; ATTRIBUTE DC101 NAME

Result:

Reserved attribute name: 'NAME'

So the question is: How can I select a name or value text in the board and hide or move to an other layer by using commands?

Best Answer

The reserved attributes NAME/VALUE cannot be modified with the ATTRIBUTE command.

When the part is smashed, name and value behave somewhat like independent objects. So you can simply delete them:

DELETE DC101>NAME;