Compounds are provided which are useful as antidiabetic agents and antiobesity agents and have the structure wherein m is 0, 1 or 2; n is 0, 1 or 2; Q is C or N; A is (CH2)x where x is 1 to 5, or A is (CH2)x1 where x1 is 1 to 5 with an alkenyl bond or an alkynyl bond embedded anywhere in the chain, or A is -(CH2)x2-O-(CH2)x3- where x2 is 0 to 5 and x3 is 0 to 5, provided that at least one of x2 and x3 is other than 0; B is a bond or is (CH2)x4 where x4 is 1 to 5; X is CH; X2 is N; X3 is C; X4 is N; X5 is C; X6 is C.