LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview and Autocad

If AutoCAD still uses dxf files, you could open that with the Read From Text File, make the changes, and save it with Write to Text File. You would have to spend some time understanding the format of the dxf file.
0 Kudos
Message 11 of 31
(2,156 Views)

Hi,

I'm not sure what you want. If you want to program objects from labview, you need to have autocad installed to access it through activex.

maybe this will help (is in lv 8.6)

cosmin

controlsag

0 Kudos
Message 12 of 31
(2,129 Views)

Hello All,

You've been of great help. Thanks Cosmin, you are right. I actually meant 'controlling Autocad from Labview'.  This is an example for one object, but

1. can i do this for multiple objects in autocad and how?

2. Also, what of if i move the object directly from autocad, how do i get an indicator in Labview reflecting this movement?

 

Thanks alot,

demmy

0 Kudos
Message 13 of 31
(2,116 Views)

demmy wrote:

Hello All,

You've been of great help. Thanks Cosmin, you are right. I actually meant 'controlling Autocad from Labview'.  This is an example for one object, but

1. can i do this for multiple objects in autocad and how?

2. Also, what of if i move the object directly from autocad, how do i get an indicator in Labview reflecting this movement?

 

Thanks alot,

demmy


 

This is where you'll have to earn your pay as a programmer.

 

If you need to do this for multiple objects, then you'll need a loop.

 

If you need to work with existing objects, there appears to a method in the AcadModelSpace reference called Item.  It returns the reference to an object based on an index number you enter.  Then you can use methods and read and modify properties on the object that is returned.  It won't be easy because you'll have to figure out a way to determine in LabVIEW which object in AutoCAD you are actually working with.  It might be iterating through all the Items until you find the one that matches particular properties.

 

If you want to monitor any changes to an object such a move, you'll probably have to read the properties of that Item in a loop and determine when they have changed from one iteration of the loop to the next.

 

None of this will be easy.  I have some big doubts that you will be able to accomplish this successfully.  I don't want to discourage you, just let you realize what you want to do is a very ambitious project.

 

I think it might be a bit easier to do most of the heavy work in AutoCAD's programming language.  It used to be LISP.  I think they now have put in some visual basic-like programming language.  You could then set up a communication protocol between the AutoCAD program and your LabVIEW program to pass commands and data back and forth.  Perhaps using TCP/IP ports between the two applications.

 

 

0 Kudos
Message 14 of 31
(2,102 Views)
What of if i decide to use Revit instead of autocad, will it make it easier to do the integration with Labview?
0 Kudos
Message 15 of 31
(2,092 Views)
No idea because I've never heard of it.
0 Kudos
Message 16 of 31
(2,088 Views)

Hi,

with some discipline and good framework you can create an application that read a drawing and modifies it in labview. Detecting the object is possible,

through exposed properties by autocad, like object name. It's quite some work. If you want to do such an application read carefully the autocad help regarding activex and autocad object models.

cosmin 

0 Kudos
Message 17 of 31
(2,058 Views)

Hello Cosmin,

I have been trying to run the code you gave me but it keeps returning the error " Error -2147221164 occurred at Class not registered". I don't know what it means. Pls, help out.

 

demmy 

0 Kudos
Message 18 of 31
(2,023 Views)

Demmy,

 

Not sure that it matters, and I suppose it is none of my biz, but why are you trying to use Labview to do this?  If you think the Labview graphical programming language will make this task easier, I don't think it will.  If I were you, I would try to write the program using visualLISP, which is included with AutoCAD, and is well documented within AutoCAD's installed help.  There are plenty of tutorials as well.  It won't happen overnight, but if you work through a few examples, I think you'll figure it out.

 

My two cents.

 

-Mike

0 Kudos
Message 19 of 31
(2,022 Views)

Well, Thank you for your input. I am actually tagging (using Wifi Tags) building components and collecting the status information in a database. The status information is coordinates (in terms of movement). I now want this movement to be reflected in the virtual tagged component in Autocad. For example, if i tag a wall and i move the wall in the physical, i want to be able to see it move in the virtual model. Also if i move the wall in the virtual model, i want to be able to get the coordinates data outside the virtual model.

I have done the first part in labview, thats why i thought the others will be easier in labview. I am only going to be dealing with 10 objects or components.

 

demmy 

0 Kudos
Message 20 of 31
(2,012 Views)