Community
EAGLE Forum
Welcome to Autodesk’s EAGLE Forums. Share your knowledge, ask questions, and explore popular EAGLE topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reference dlgPushButtons / dlgCells in ULP

0 REPLIES 0
Reply
Message 1 of 1
tobias.vogel
201 Views, 0 Replies

Reference dlgPushButtons / dlgCells in ULP

tobias.vogel
Explorer
Explorer

Hello,

 

within my ULP I am populating a dlgCell with dlgPushButtons from a String-Array like this:

  dlgGridLayout {
  int rows = 0;
  int cols = 0;
  while (SpecialObjects[countObjects]) {
    dlgCell(rows, cols) dlgPushButton(SpecialObjects[countObjects]) {
        ... // <- reference to this pushbutton object needed here
    };
    cols++;
    if (cols == 13) {
      cols = 0;
      rows++;
    }
    ++countObjects;
  }

I need to find a way to figure out, which button the user pressed, a.k.a. have a way to reference the Pushbutton object.

 

Any references to the indices used for the generation of the Pushbuttons will not be evaluated during the generation of the Pushbuttons, e.g. something like

int a = 0;
int b = 0;
int c = 0;

dlgCell(rows, cols) dlgPushButton(SpecialObjects[countObjects]) {
    a = countObjects;
    b = rows;
    c = cols;
};

will result in every Pushbutton containing the same values for the variables a,b,c (example).

Any help is greatly appreciated!

0 Likes

Reference dlgPushButtons / dlgCells in ULP

Hello,

 

within my ULP I am populating a dlgCell with dlgPushButtons from a String-Array like this:

  dlgGridLayout {
  int rows = 0;
  int cols = 0;
  while (SpecialObjects[countObjects]) {
    dlgCell(rows, cols) dlgPushButton(SpecialObjects[countObjects]) {
        ... // <- reference to this pushbutton object needed here
    };
    cols++;
    if (cols == 13) {
      cols = 0;
      rows++;
    }
    ++countObjects;
  }

I need to find a way to figure out, which button the user pressed, a.k.a. have a way to reference the Pushbutton object.

 

Any references to the indices used for the generation of the Pushbuttons will not be evaluated during the generation of the Pushbuttons, e.g. something like

int a = 0;
int b = 0;
int c = 0;

dlgCell(rows, cols) dlgPushButton(SpecialObjects[countObjects]) {
    a = countObjects;
    b = rows;
    c = cols;
};

will result in every Pushbutton containing the same values for the variables a,b,c (example).

Any help is greatly appreciated!

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report