Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load the library from IronPython #201

Closed
xyont opened this issue Oct 7, 2023 · 2 comments
Closed

load the library from IronPython #201

xyont opened this issue Oct 7, 2023 · 2 comments

Comments

@xyont
Copy link

xyont commented Oct 7, 2023

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
Copy link
Author

xyont commented Oct 8, 2023

try to modify, got another error messages.

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

@xyont
Copy link
Author

xyont commented Oct 11, 2023

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

@xyont xyont closed this as completed Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant