Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit Api open and edit drawing autocad 2015

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
rodrigohbm
5162 Views, 6 Replies

Revit Api open and edit drawing autocad 2015

hola amigos
hay forma de abrir y editar dibujo de autocad desde revit:

tengo un proceso de exportacion a dwg desarrollado para revit, la idea es que luego de exportacion se edite el dibujo en autocad pro medio de codigo.

 

tengo las referecion de :

 

Autodesk.AutoCAD.Interop
Autodesk.AutoCAD.Interop.Common

--------------------------------------------
Imports System.Runtime.InteropServices
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
------------------------------------------------

 

CODIGO DEL PROCESO EXPORTACION A DWG EN REVIT.


A CONTINUACION PROCESO AUTOCAD

Dim AcadApp As Autodesk.AutoCAD.Interop.AcadApplication
Dim acaddoc As Autodesk.AutoCAD.Interop.AcadDocument

AcadApp = GetObject(, "Autocad.Application")
acaddoc = AcadApp.ActiveDocument

Dim dibujo As String = ( rutadir & nomarchivo )
acaddoc.Open( dibujo , False )

 

saludos.

6 REPLIES 6
Message 2 of 7
Revitalizer
in reply to: rodrigohbm

Dear rodrigohbm,

 

I think there a lots of people who want to help you but who don't understand Spain.

 

 

Sorry,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 7
rodrigohbm
in reply to: Revitalizer

ok....Thanks!!

Message 4 of 7
DavidIntVeld
in reply to: rodrigohbm

I have an application that opends a DWG, 

but it simply uses:

 

                    System.Diagnostics.Process.Start(fullfp);

 

where fullpath = your DWG path

you need to have Autocad set as your default program to open DWG, but i would see no reason any Draughtsman would not...

 

 

Message 5 of 7
Revitalizer
in reply to: rodrigohbm

Hi Rodrigohbm,

 

and as you can see in my posting, it is not even necessary to use correct grammar to be understood, anyway.

 

 

Best regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 6 of 7
rodrigohbm
in reply to: DavidIntVeld

 

ok....gracias

me resulto con:

 

dim AcadApp As Autodesk.AutoCAD.Interop.AcadApplication
dim acaddoc As Autodesk.AutoCAD.Interop.AcadDocument

Dim dwgName As String = rutadir & nomarchivo

AcadApp = GetObject(, "AUTOCAD.APPLICATION")
acaddoc = AcadApp.activeDocument

acaddoc.Application.Documents.Open(dwgName) 

Message 7 of 7
BKSpurgeon
in reply to: rodrigohbm

hi thank you for your answer. 

 

is there a way to do this without using interop? (i.e. I want to open an AutoCAD drawing, read it and extract some geometry, and then build Revit objects using that geometry).

 

will post code once i grok this.

 

any advice much appreciated.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community