- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
I have devised a solution, but its a bit of a walk through.
Inside block attributes you can insert fields. You can nest other fields in these fields in conjunction with formulas.
If you use the maximum value equation you can find the largest of two values.
The equation is as follows:
MAX(a,b) = 1/2(a+b+|a-b|)
This equation looks like the following in CAD
1/2*(a+b+abs(a-b))
So if you use the formula and reference attribute values you can build a formula that will return the largest value in a series of numbers. I did this with just 4 numbers as you cant cut and paste fields in the formula so it takes a while. If i were to do it in the future i might use hidden attributes to hold values so as to reduce the length of the formula. Below is what my nest formula looks like for 4 numbers.
1/2*((1/2*(A+B+abs(A-B)))+(1/2*(C+B+abs(C-D)))+abs((1/2*(A+B+abs(A-B)))-(1/2*(C+D+abs(C-D)))))
you can see how the length grows considerably in length as you add variables.
All that said, it works and it creates an automatically updating title block based on the highest rev number. there are some issues that would have to be worked out if it were put into production as the values cannot be null or less than zero so it would have to be populated with 0s from initial release. for better or worse here is a screencast of the "smart" title block that doesn't use any code.
you can fast forward to the end to see the magic.
CADnoob