Hello,
could you please tell me how exactly you would like to use the ID of current document type?
You could use the context macro on Page tab, Design tab or Properties tab but on Form tab it will not work. But the form tab relates to one document type so I am not sure why you could need the dynamic value instead of static ID.
You may know the ID of document type either by API () or take a look to the CMS_Class table in Kentico
CMS database, find the results for your ClassName and see the ClassID.
Best regards,
Helena Grulichova