If a caster successfully casts dispel magic on a magic weapon, can the caster then cast the spell polymorph any object on that temporarily nonmagical weapon to transform the weapon into a different weapon?
RAW, your concept works. See this Related Question (this site) and user TheDarkWander's explanation:
The RAW do not explicitly state that spells do end if a target/subject stops being a valid target/subject, so the effects don't end under that condition if the only rules are the RAW (because, by default, things don't happen), though the GM can certainly rule otherwise without violating the RAW. The problem with doing so is that many of the spells that do change a creatures type (e.g. those cited above) can target only a certain type of creature other than the end type, clearly indicating the Rules As Intended are the interpretation I advocate here.
As you may have noticed, this kind of 'no rule' ruling is HEAVILY GM dependent and easily falls within their purview of what is 'supposed' to be home-ruled as part of the GM's responsibility.
My 2 cents is that it's reasonable for an 8th level spell to be able to alter the shape of a magic weapon to another weapon, but I'd most likely RAI it that after the Dispel ends, the magic weapon reverts itself by 'overpowering' the more temporary (although still technically permanent because of the point system) spell.
What you must keep in mind that Polymorph Any Object has a minor restriction - it's duration is defined by Duration Factor (see example here - http://www.d20srd.org/srd/spells/polymorphAnyObject.htm) so to make polymorph permanent you must fulfill a few requirements.
Next. In "default setting" of DnD 3.5 your concept definitely works, and that is why: description of Dispel Magic clearly and in no uncertain terms says that when magic item is affected by Dispel, it is non-magical. Now it's non-magical. It can become magical tomorrow (I mean after 1d4 rounds when dispel ends) but that's untangable future. What you have is now, present moment. So you can polymorph it because NOW it's non-magical.
What happens when duration of dispel magic ends in "default DnD 3.5 setting"? If you read carefully description of dispel magic, and in context, it operates only with concept of magic properties of item. Those are separate from item's physical form. When dispel starts - magic properties are gone, when duration ends, magic properties are back. No more, no less. So that effect of it doesn't affect physical form of item, physical manifestation of magic item and it's properties are orthogonal from the point of view of detect magic. Nothing more to say here.
So you concept works in "default DnD 3.5 setting".
And here comes strangeness. I often repeated "default setting". What is it? It is something generic, implied setting of DnD 3.5 with bits of world. A framework for GM to define his own world fast, or to have some inspiration.
When you move to specific setting - be it your own or one created by other people, your world will redefine bits of default rules. For example, Forgotten Realms setting have no Pelor, some spells work differently because of the way it's magic works.
Now, considering your game, you might have a freedom of interpretation - wherever that smart move of your players is allowed or not. Personally I think that this creative, thoughtful use Polymorph Any Object and Dispel Magic is awesome. I don't like that it's really predictable though (but that's my own taste - don't like predictable and reliable magic ^ ^). I mean if that item was created by deity or monster - maybe it's reshaping can produce reaction from it's creator? (be it joy+gratitude or anger+disapproval or something neutral but weird?) Also keep in mind that if in your setting that exact magic device is quite connected to physical parts on that item (be it runes, or gems, or certain molecules) with importance of relative measures and properties of materials between those "important magic points" - for that setting it makes perfect sense that violent, uncaring "rewiring" will break it's functions (c'm on if your magic is disguised futuristic Earth tech then rewiring of sword with electronic CPU will definitely break it, lol) I think that inner integrity of setting is important.
Something like that. ^ ^
It should work. At least for a few moments.
If the object that you target is a magic item, you make a dispel check against the item’s caster level. If you succeed, all the item’s magical properties are suppressed for 1d4 rounds, after which the item recovers on its own. A suppressed item becomes nonmagical for the duration of the effect.
According to RAW it is doable. The problem starts after those 1d4 rounds, because we get stuck in a paradox.
- the dispell magic doesn't suppress the item, it becomes magical again
- polymorph any object can't turn a nonmagical weapon into magic one
A nonmagical object cannot be made into a magic item with this spell. Magic items aren’t affected by this spell.
There are few possible scenarios and each is as much according to the rules as others.
polymorphed item becomes magical
It is not caused by polymorph any object, but the end of dispell magic effect.
polymorph stops working
Since dispell magic's effect stopped the item is magical now and magical items are unaffected by polymorph any object.
polymorphed item is nonmagical
For the duration of polymorph any object, the item stays nonmagical(which can be even permanent).
No, that shouldn't work.
When a magic item is targeted by Dispel Magic its magic is not dispelled, just suppressed - it temporarily become a 'suppressed magic item':
[...] all the item's magical properties are suppressed for 1d4 rounds, after which the item recovers its magical properties. A suppressed item becomes nonmagical for the duration of the effect. An interdimensional opening (such as a bag of holding) is temporarily closed. A magic item's physical properties are unchanged: A suppressed magic sword is still a sword (a masterwork sword, in fact). Artifacts and deities are unaffected by mortal magic such as this.
(All emphasis mine, here and below)
On the other hand, spells and magical effects targeted by Dispel Magic are Dispelled:
Targeted Dispel: One object, creature, or spell is the target of the dispel magic spell. [You make one dispel check against the highest-caster-level spell]. If successful, that spell ends. If not, compare the same result to the spell with the next highest caster level. Repeat this process until you have dispelled one spell affecting the target, or you have failed to dispel every spell.
[...] If you target an object or creature that is the effect of an ongoing spell (such as a monster summoned by summon monster), you make a dispel check to end the spell that conjured the object or creature.
The description consitantly uses the term 'suppressed' for magic items, and 'dispelled' or 'ended' for spells and effects.
Suppressed magic and dispelled magic are not the same
See the description of Antimagic Field:
Antimagic does not dispel magic; it suppresses it. Once a magical effect is no longer affected by the antimagic (the antimagic fades, the center of the effect moves away, and so on), the magic returns. Spells that still have part of their duration left begin functioning again, magic items are once again useful, and so forth.
Here the rules spell out that the terms 'dispelled' and 'suppressed' do not have the same meaning - when a spell is suppressed, it ceases to function and does not have any detectable magical effect, but - it doesn't cease to exist: the rounds passing while it is suppressed still 'count' against its total duration. Put differently - while the spell has no detectable magic, the game still "tracks" the suppressed spell - it still "knows that the spell is there" and will resume to function when the suppression wears off.
Similarly, for a suppressed magic item, the game still "knows that it is a magic item" (i.e. it is different than a mundane item) even while its magic is suppressed and it is non-magical (i.e. its magical effects are not functioning)
So, while it becomes nonmagical for the duration (its powers are unavailable, it doesn't register when using Detect Magic etc.), it doesn't become a mundane item - it still is a magic item, and as such can't be targeted by Polymorph any Object.
As always, your DM can rule otherwise.
As a side note: if what you want is not a trick for destroying an opponent's magic weapons, but rather a means to change a magic weapon you own, you can probably work with your DM to houserule something based on Adding new abilities to a magic item, where a crafter who meets the prerequisits for creating the weapon may 'transfer' them to a new weapon (maybe with the original MW weapon destroyed during the process) - this will make the process a downtime action rather than something to do mid-combat (bypassing the whole offensive application), as well as having more fitting prerequisites for the specific magic weapon (so e.g. changing a +1 flaming sword is easier than changing a +5 vorpal sword)
(This probably merits a different question)