IFC import to Civil 3D

IFC import to Civil 3D

Anonymous
Not applicable
671 Views
1 Reply
Message 1 of 2

IFC import to Civil 3D

Anonymous
Not applicable

I'm trying to develop a VB.Net Application in Civil 3D 2018 so I can convert some IFC files to dwg.  I've tried using the SendCommand, but this doesn't wait until the process has completed, before moving to the next task and this is causing an error.  This there a better way to access the IFCIMPORT command?

 

This is my code

Dim FileName as String = "C:\Test.ifc"

Dim DrawingName as String = "C:\Test.dwg"

Dim CommandLine as String - "-IFCIMPORT" & vbCr & FileName & vbCr & "NO" & vbCr & DrawingName & vbCr & "IMPORT" & vbCr

ActiveDocument.SendCommand(CommandLine)

 

Thanks in advanced

 

Steven Houghton

 

 

0 Likes
672 Views
1 Reply
Reply (1)
Message 2 of 2

AdammReilly
Collaborator
Collaborator

If you're going to rely on running the commands AND your going to do in in a dotNet app, you might be best served to setup a handler to respond to the command ended event. This way, you can explicitly trigger your next step after the last one is completed.

 

Adam Reilly
Civil 3D 2026
Creator A16 AI+ A3HVFG
Windows 11 Pro
AMD Ryzen AI 9 365 w/ Radeon 880M
LinkedIn
Group Leader badge
Austin CADD User Group
LinkedIn | Discord
Civil 3D Certified Professional