Revit Api open and edit drawing autocad 2015

Revit Api open and edit drawing autocad 2015

rodrigohbm
Advocate Advocate
5,567 Views
6 Replies
Message 1 of 7

Revit Api open and edit drawing autocad 2015

rodrigohbm
Advocate
Advocate

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.

0 Likes
Accepted solutions (1)
5,568 Views
6 Replies
Replies (6)
Message 2 of 7

Revitalizer
Advisor
Advisor

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





0 Likes
Message 3 of 7

rodrigohbm
Advocate
Advocate

ok....Thanks!!

0 Likes
Message 4 of 7

Anonymous
Not applicable

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...

 

 

0 Likes
Message 5 of 7

Revitalizer
Advisor
Advisor

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





0 Likes
Message 6 of 7

rodrigohbm
Advocate
Advocate
Accepted solution

 

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) 

0 Likes
Message 7 of 7

BKSpurgeon
Collaborator
Collaborator

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.

0 Likes