lv net dll py
v0.1
Python에서 .net dll (labview 클래스 포함)에 액세스하십시오
ca_obj = ClientApp1Lib . ClientApp1Lib . ClientApp1 ()
# alas, it calls "new" which triggers file search popup window (known LabVIEW class issue) # so start with a non initialized obj ref and use Create.vi to initialize the LabVIEW class ref
ca_obj = AssemblyLib . ClientApp1Lib . ClientApp1
ca_Type = clr . GetClrType ( AssemblyLib . ClientApp1Lib . ClientApp1 ) # get type
print ( ca_Type . FullName , " t " , ca_Type )
# GetUninitializedObject to avoid constructor and 'new' issue
ca_obj = System . Runtime . Serialization . FormatterServices . GetUninitializedObject ( ca_Type ) print ( ca_obj . IsValid (), " t " , ca_obj ) # False
ca_obj = AssemblyLib . ClientApp1Lib . ClientApp1 . Create ( ca_obj , ca_obj )
print ( ca_obj . IsValid (), " t " , ca_obj ) # True참고 : vs의 생성자 노드 문제에 대한 자세한 내용은 '새'가 디스크에서 lvclass 파일에 대한 브라우징을 참조하십시오.
clientApp1.dll (My interopassembly 예제)
consoleapp_ra_e0/program.cs (내 C# 콘솔 예)
다이나믹 라이브러리를 호출하는 방법 (Pythonnet Wiki)
NET를위한 Python CSHARP 클래스의 인스턴스를 명시 적으로 만드는 방법 (StackOverFlow QA)