Altium Query to find free pads? - Page 1
Forum section: electronics / general

author: RedLion
author_rank: Regular Contributor
timestamp: July 26, 2020, 04:43:27 pm
content: Hello everyone,I would like to have a custom design rule, such that my PCB mounting holes are direct connected to my planes/polygons, while every other pad is relief connected. A few things on my designing habits:- I always place my mounting holes as free pads in the PCB directly, for added flexibility- I always use the Designator 0 for mounting holes and I use itonlyfor mounting holes- If there is copper around the pad, I generally connect it to groundSo the query I would like to perform is something along the lines of "Designator is 0" or "Pad is free". Apologies if that doesn't make much sense, but I am self-taught in Altium and I don't very much use the Altium query language.Normally I make do with the query helper and query builder, but I didn't find anything that worked on my own. Is this even possible?Thanks,Ivo

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 26, 2020, 06:05:01 pm
content: 1. Use mounting hole components. Single pin symbol, hole footprint. Connect to net. This way it's obvious and explicit on the schematic: your holes are not insulated and floating, they have this connection.2. Free pads can be assigned nets in Properties, or in netlist editor (D, N, N). (You've probably done this already.)3. Free pads can be queried by the name 'Free-' + <pad name>. Your holes would seem to be 'Free-0'.4. Under Polygon Connect rules (D, R), add a rule, with elevated priority, to connect direct (no relief), with first object query: "IsPad AND (Name = 'Free-0')". You can further query the second object (polygon) if you would like special cases. Polygons can be named for instance, and queried with IsNamedPolygon(name).5. You may be able to construct more complex queries with right-click object, Find Similar Objects... Tick "create expression" to show how it's done it.6. This should be helpful:https://techdocs.altium.com/node/300788As you gain experience with it, I think you will find queries are very useful indeed.The biggest limitation is no support for relational logic: you can only query single objects. For example, you cannot query a component that has pin(s) in a given net. That particular operation can be reconstructed by querying the pads ("IsPad AND NOT IsFree AND InNet('MyNet')"), then going to Properties and following the hyperlink to Component/Owner.The biggest frustration, is every, single, fucking, property, hasthree different names.There is the text label in Properties (e.g., pad "X Size (All Layers)"), which is also the label used in the List Panel; there is the query name ("PadXSize_AllLayers"), and there is the name that can be used in assignment expressions on that object (??). I haven't found a list of the latter labels. (A property can always be self-referenced with "!". Example: to move a selection of objects 50 mils to the right, enter: "! + 50mils" in X1.)Tim

author: RedLion
author_rank: Regular Contributor
timestamp: July 26, 2020, 07:23:46 pm
content: Quote from: T3sl4co1l on July 26, 2020, 06:05:01 pmThanks, that did the trick. Searching the Altium Techdocs is not very easy most times.Quote from: T3sl4co1l on July 26, 2020, 06:05:01 pmI have seen this done on PCBs done by other people, but I don't think that would work for me unfortunately.In general, the mounting holes are part of my templates, as I am often constrained by specific housings, and I will connect the mounting studs as needed.I also like having the freedom to place the holes and connect/disconnect all in the PCB.If I ever have to design PCBs in a company environment, I'm sure I will pick up the "right way", but so far I'm just dicking around for my entertainment.