import python problem

255
1
08-19-2022 09:17 PM
JeoCho
by
New Contributor II

hi 

i am  beginner in cityenigne 

very nice to meet you 

and thank you for good help .

i have a problem >

i made this python .

but that did not work  .

pls can you teach me ?

 

 

from scripting import *
import sys
sys.path.append("C:\\ad")


ce = CE()
settings = dxfImportSettings()

ce.importFile(ce.toFSPath("C:\ad\1.dxf"), settings)

0 Kudos
1 Reply
JonasObertuefer
Esri Contributor

Hi @JeoCho,

  • "C:\ad\1.dxf" is already a filesystem path, so no need to convert it using ce.toFSPath.
  • there is no dxfImportSettings() its actually called DXFImportSettings()

So something like this should work:

from scripting import *
ce = CE()
settings = DXFImportSettings()
ce.importFile("C:\ad\1.dxf", settings)

Best,
Jonas

0 Kudos