Attach image from VB.NET to AutoCad

Attach image from VB.NET to AutoCad

Anonymous
Not applicable
1,790 Views
4 Replies
Message 1 of 5

Attach image from VB.NET to AutoCad

Anonymous
Not applicable

Hello!


I have just started to programming VB.NET with AutoCad but can´t find any information about how to attach a image from a userform commandbuton into AutoCad. I have programming in VBA before but can´t find any solution for inserting pictures in VB.NET. Is it possible to use the "imageattach" with attributes? or -image command? Or should I use Rasterimage?

 

I want a image (*.jpg*) file to appear in AutoCad when I press the Commandbutton in my Form.

I hope you understand what I mean. And excuse,if my english is bad!

Thanks

0 Likes
1,791 Views
4 Replies
Replies (4)
Message 2 of 5

SENL1362
Advisor
Advisor

search for  RasterImage   in http://through-the-interface.typepad.com

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi! Thanks for the link. Have looked there and can only find codes for C#. What library do I need to import for doing rasterimage?

0 Likes
Message 4 of 5

arcticad
Advisor
Advisor

http://www.developerfusion.com/tools/convert/csharp-to-vb/

---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes
Message 5 of 5

fieldguy
Advisor
Advisor

Reference library is acdbmgd. Rasterimagedef is a member of Autodesk.AutoCAD.DatabaseServices.

 

My code samples are limited.  You should search here for more.

 

ObjectID of dictionary is

Dim imagedictionaryId As ObjectId = RasterImageDef.GetImageDictionary(db)

Dictionary is

Dim imagedictionary As DBDictionary = tx.GetObject(imagedictionaryId, OpenMode.ForWrite)

 

0 Likes