ixmilia / dxf

MIT License
218 stars 67 forks source link

load the library from IronPython #201

Closed xyont closed 1 year ago

xyont commented 1 year ago

Hi,

i'm interesting to call and load the library from IronPython, however it's not succeed. Any hints and suggestion?

thanks in advance,

` import clr clr.AddReference("IxMilia.Dxf.dll")
import System clr.AddReferenceByPartialName("System.Drawing") from IxMilia.Dxf import *

ent = IxMilia.Dxf.Entities () dxfFile = DxfFile() dxfFile.ent.Add(DxfLine(DxfPoint(0,0,0),DxfPoint(50,50,0))) dxfFile.Save("test.dxf") `

error messaes shown,

`

C:\Program Files\IronPython 2.7\ipyw -u "test9.py" Traceback (most recent call last): File "test9.py", line 8, in NameError: global name 'IxMilia' is not defined Exit code: 1 `

xyont commented 1 year ago

try to modify, got another error messages.

2023-10-09 02_58_46-test9 py - SciTE

xyont commented 1 year ago

by trial and error, it seems the problem solved.

below script is works.

2023-10-12 01_45_34-test9 py - SciTE

2023-10-12 01_45_09-nanoCAD 5