Matster Posted April 3, 2019 Share Posted April 3, 2019 I need a way of finding out what the highest number is of a specific record and then putting it on the drawing (ideally auto updating!) This is for a few things, chair/table number (don' really like the auto creation tool!) and cable numbers on schematics, these are just a couple of current requirement, but i just think it would be really useful! Quote Link to comment
JBenghiat Posted April 3, 2019 Share Posted April 3, 2019 You probably want to move this over to the scripting forum. There’s no magic bullet here, especially to work universally, but the algorithm is fairly straight forwards: Define a global variable = 1 iterate through objects with a ForEachObject command Get the value of your ID field and convert to number if the value is greater than the global, set the global to the value once through all the objects, return the global 1 Quote Link to comment
Matster Posted April 3, 2019 Author Share Posted April 3, 2019 Thanks I have no (or limited) clue with scripting, so i think i'll re-post this in the Python forum and see if any can lead me through it! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.