Hi, I'm trying to sort this it designators on a mechanical layer pair for assembly drawing.
I've added the layer pair, a bounding box around my components and a centred text label with the special string .designator
The issue still stands from 2011 whereby text string cannot be centred and are aligned bottom left. Also it has to be the size of the string .designator meaning it's really big and you end up only having text boxes you can select where ever you click.
I found the altium script AdjustDesignators2 which looks very promising. It does a nice job of resizing the test and rotating it all nicely to be 0 or 90 degrees so nothings upside down.
What it doesn't do is resize the text box. I believe all the information is there in the script to do it as it calculates the bounding box on the same layer as the text to define the text size. I was hoping someone who is understands the scripting language might be able to modify it slightly to do this?
Basically it currently calculates the bounding box, works out the major dimension and scales the font. Then it sets everything and rotates the text box correctly.
What I would like is if it also changed the height and width of the text box and then adjusted the X and Y coordinates to be at the bottom corner of the bounding box it found. I think the numbers are there but I just have no experience with the language and the particulars not altium API.
Any one have an idea?
https://github.com/Altium-Designer-addons/scripts-libraries/