[D0004] Set the coil material

 

Sets the material for parts in the current study named “Coil” to copper.

from designer import *

def main():
	DeApp = GetApplication()
	study =  DeApp.GetCurrentStudy()
	if study.IsValid() == 0:
		MsgBox("No current study")
		return

	copper = DeApp.CreateMaterial("Copper")
	study.SetMaterial ("Coil",(copper))

if __name__ == "__main__":
main()

Download Python source code

How to use script file

Use the JMAG Script Library after reading and agreeing to the following terms of use.