[SOLVED] Is there any way to attach -D from within arduino IDE

It's in the exeFolder/hardware/arduino/avr and can work in conjunction with the new properties in the 1.5 boards.txt

Alternatively if you want it to work with 1.0.x formats then the visual studio plugin allows any number of -D defines via the project property "Defines - Project"

But 1.5 might be the simplest route unless you also want intellisense etc and are using windows.