How to measure

Alright folks, these are a whole new ballgame to me and please forgive me as I’m sure this has been asked and answered but no matter how I word my query I don’t seem to get the specific answer I’m after.
Do you measure a pistol from the end of the muzzle device (not perm) or the end of the threads to the end of the buffer tube or the end of any attached brace type device?
Mine has the SBa3 brace, 10.3" barrel and a BCM mod0 comp(for now) and I come to 26.25". I’m wanting to add a foregrip of some sort. I actually like the magpul afg a little better but a short vert like a BCM is good too. I know they, according to the ATF, are different and change completely and dramatically the status of my weapon. I know that over 26=vert and less than 26=angled= GTG but where and what do I measure and include in, or exclude from, that measurement?

End of the barrel (threads as you put it) unless the MD is permanently attached- is my understanding.

Isn’t the OAL requirement only if a truly vertical grip is installed regarding a pistol?

Overall length is measured from the end of the arm stabilizing brace to the end of the barrel, be sure that the weapon is level, a large framing square can help with this.
If a vertical forward grip is fitted and the stabilizing brace is needed to keep the pistols overall length at 26 inches or greater then the vertical forward grip must be removed before the stabilizing brace. If a vertical forward grip is placed on a pistol which is less than 26 inches in overall length an “any other weapon” (AOW) is created. Creating an AOW without first completing the proper NFA forms, paying the required 200.00 tax and receiving approval from the ATF NFA Branch is unlawful and would subject the violator to arrest and prosecution.

All of which makes sense, is perfectly reasonable, and contributes greatly to society…