Hello,
Has anyone got working exampe of SetClosestMediaName function?
I was trying everything and if I want to use this method, I'm always getting eInvalidInput.
Anyone knows why?
Thanks.
That method, according to the documentation in ObjectARX SDK (2012/13/14, that I downloaded), is not implemented.
I remembered in one of my drawing printing project, I also tried this method with very promising name in vain and only found out later it is not lmplemented in .NET API. Then I had to write my own code to find a closest printing media by looping through the available media sizes to compare them to the needed paper size.
HTH
Norman Yuan
I had the same problem and ended up with something like norman describes. This is what I used.
Dim medias As StringCollection = psv.GetCanonicalMediaNameList(ps) Dim mediafound As Boolean = False For j As Integer = 0 To medias.Count - 1 If psv.GetLocaleMediaName(ps, j) = "your page description" Then psv.SetCanonicalMediaName(ps, medias.Item(j)) mediafound = True Exit For End If Next