- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Problem 1: As shown in the picture below, the input boxes do not line up properly with grid.
Nor do the words under "Plate" stay centered in the grid. They keep moving lower and lower.
Not a big deal but noticeable, and depending on the length of the list, it could be a problem.
Problem 2: Next, I click on row 1 in the table, "CP Plate" then click a body in the mold base which fills in the blanks with the current part name and number.
I fill in the blanks with what I want the part number and name I want it to be.
When I am satisfied with my in put I click on row 2, "A Plate" and click on the A plate in the assembly.
When I click on the next "A Plate", it fills in the blanks as before, but deletes row 1,
Every time I change rows and click a different plate, it deletes the previous plate no matter what order I have clicked on them.
Th following is the lines of code I believe is the problem.
213 if changed_input.id == 'body':
214 if table_input.selectedRow == -1:
215 ui.messageBox('Select one row to change.')
216 else:
217 selection_input = inputs.itemById('body')
218 rowSelection = table_input.selectedRow
219 row = rowSelection
220 plateSelection = selection_input.selection(0).entity.parentComponent
221 for i in range(1, len(moldPlatesList) - 1):
222 if i == rowSelection:
223 _inputStringNum.value = plateSelection.name
224 _inputStringName.value = plateSelection.partNumber
225 table_input.removeInput(rowSelection, 1)
226 table_input.removeInput(rowSelection, 2)
227 table_input.addCommandInput(_inputStringNum, rowSelection, 1, 0)
228 table_input.addCommandInput(_inputStringName, rowSelection, 2, 0)
I have gone through debugging and do not see anything.
I have verified the value of rowSelection
I have to do lines 225 & 226 before 227 & 228 or I get an error message.
It just keeps looping through this same code set.
This started with the Table section of code from the Add-in "CommandSample" by Patrick Rainsberry for Autodesk.
The entire code package is attached, just keep in mind that this is still in development and this is my stumbling point right now.
Any assembly will work, this is just being made for plastic injection mold assemblies.
Solved! Go to Solution.