Programming in Autocad - external files

Programming in Autocad - external files

stefanveurink68AXD
Advocate Advocate
1,346 Views
5 Replies
Message 1 of 6

Programming in Autocad - external files

stefanveurink68AXD
Advocate
Advocate

Dear everybody, 

 

At my company (where we work with autocad) we've got some third party plugins (most importantly infracad). 

 

In this plugins there is 2 functions I'd really wonder how they are made, or in what type of coding they're made (objectarx? dot net? not in VBA thats for sure, and probably neither in lisp). And how I could make similar functions. Here's their functionality: 

 

1) when you keep your mouse on a line, it gives you some 'meta-data' about the line, which isn't saved in the drawing itself, but in some external xml file saved somewhere else on the computer. When the mouse is on the object (not clicked), a window/pallette pops up (similar to for example quick properties) with some data like for example the owner of the object, and an working hyperlink to the website to contact the owner. I've written some topic about allready with the question if this was an autocad/civil function (which it wasn't), find it here.

 

2) by infracad (which is some kind of pallete with all kind of buttons and dropdownlists) you can load photo's (.jpg) in your drawing. If these photo's have got an GPS-location, on these locations there are placed some 'scale-independent' blocks, and when you keep your mouse on that block (again not clicking it), the actual photo taken on that location pops up in autocad. By scale-independent I mean that nomatter if you zoom in or out, the blocks are allways displayed the same size (for example 1 centimeter on your screen instead of 1 centimeter in you're coordinate system)... so something like the way points can be shown in autocad with pdmode. (Bby the way the blocks are only scale-independent (and only showing the picture) when the plugin is loaded, if not loaded it acts like a normal block). 

 

Anybody got any clue how this is done? And if I can do something similar myself? I'm not looking for exactly how and what to do but more for something like 'use this language or this classlib or something like that'. I'm looking for something that makes me ring i bell so i know where to look/search. 

 

Thanks! 

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

doaiena
Collaborator
Collaborator

That sort of functionality can be done in lisp. Lee Mac has a great example of that on his website: Dynamic Information Tool by Lee Mac

0 Likes
Message 3 of 6

stefanveurink68AXD
Advocate
Advocate

Sorry this is not what i mean. 

 

I'm talking about information that's stored OUTSIDE of the drawing, for example some xml file or stuff like that. 

0 Likes
Message 4 of 6

cadffm
Consultant
Consultant
Accepted solution

You can read and write data from or to external file or registry or whatever with all APIs ,

but .Net should be the best if you are not a prof. C++ programmer.

 

plain Lisp/VisualLisp  is the worth for dialog, VBA, .NET , C++ (in this Order).

 

But back to your question: I'd really wonder how they are made, or in what type of coding they're made

It is absolutely simple! If you have the files (WE HAVEN'T).

 

Upload a screenshot of this Info-Dialog.

Is the style more like RENAME dialog? -> then it is 99% Lisp

Is the style more like PROPERTIES Palette? -> then it is 99% .Net (or c++)

..

 

 

Sebastian

Message 5 of 6

stefanveurink68AXD
Advocate
Advocate

Thanks this is the answer I was looking for. 

 

Must be .net / C++ then. Yet another reason why I should learn this as quick as possible Smiley Happy

 

For your information I uploaded the screenshot (the one that was uploaded in the referred topic too.)

 

Thanks! 

0 Likes
Message 6 of 6

doaiena
Collaborator
Collaborator

C++ is not something you can learn in a hurry. If this is not a point monitor event driven function, but a command you start and then hover over the drawing objects, it can be easily done in lisp + OpenDCL in a couple of hours. If it's event driven, i would go for .NET, because of the high skill barrier, that C++ has.

0 Likes