.NET

Reply
New Member
lejros
Posts: 2
Registered: ‎01-17-2012
Message 1 of 5 (402 Views)

Attach image from VB.NET to AutoCad

402 Views, 4 Replies
01-17-2012 10:11 AM

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

Mentor
SENL1362
Posts: 213
Registered: ‎07-20-2011
Message 2 of 5 (384 Views)

Re: Attach image from VB.NET to AutoCad

01-17-2012 12:31 PM in reply to: lejros

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

New Member
lejros
Posts: 2
Registered: ‎01-17-2012
Message 3 of 5 (377 Views)

Re: Attach image from VB.NET to AutoCad

01-17-2012 02:07 PM in reply to: lejros

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?

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 4 of 5 (374 Views)

Re: Attach image from VB.NET to AutoCad

01-17-2012 02:22 PM in reply to: lejros

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

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



(defun botsbuildbots() (botsbuildbots))
Valued Mentor
fieldguy
Posts: 379
Registered: ‎03-31-2005
Message 5 of 5 (365 Views)

Re: Attach image from VB.NET to AutoCad

01-17-2012 03:09 PM in reply to: lejros

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)

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!