.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inserting blocks with VB.NET

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
755 Views, 6 Replies

Inserting blocks with VB.NET

Hey Everyone!

I am trying to insert blocks from a user tool with list view into drawings. I seem to be unable to do this on my own. I have looked at many listings here but are still having trouble. Can anyone help? Drag and drop help would be great too!
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

1 - Find is you insert block in model or paper space
2 - Ask to user insertion point. For this use acadDoc.Utility.GetPoint
3 - Insert block

dim objBlock as AcadBlockReference
objBlock = acadDoc.ModelSpace.InsertBlock(Insertion point, path + filename
block, X scale, Y scale, Z scale, Rotation angle)
ex.:
objBlock = acadDoc.ModelSpace.InsertBlock(InsPt,"c:\temp\test.dwg", 1, 1, 1,
0)


a écrit dans le message de news:
5086970@discussion.autodesk.com...
Hey Everyone!

I am trying to insert blocks from a user tool with list view into drawings.
I seem to be unable to do this on my own. I have looked at many listings
here but are still having trouble. Can anyone help? Drag and drop help
would be great too!
Message 3 of 7
Anonymous
in reply to: Anonymous

Thanks for the replay!!!!!! what class is acadDoc Under?
Message 4 of 7
Anonymous
in reply to: Anonymous

dim acadApp as AutoCAD.AcadApplication
dim acadDoc as AutoCAD.AcadDocument

Is not class, is just active document of AutoCAD application but in your
reference, add AutoCAD Object Library


a écrit dans le message de news:
5087168@discussion.autodesk.com...
Thanks for the replay!!!!!! what class is acadDoc Under?
Message 5 of 7
Anonymous
in reply to: Anonymous

Heres what i've got so fare, I have lookd all thought the class view and still can't find them,



Imports Autodesk.AutoCAD
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.ApplicationServices.Document
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.Colors
Imports Autodesk.AutoCAD.Windows
Imports Autodesk.AutoCAD.Windows.ToolPalette
Imports DBTransMan = Autodesk.AutoCAD.DatabaseServices.TransactionManager
Message 6 of 7
Anonymous
in reply to: Anonymous

Ok, I got everything exept how I define the insertion point

Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common


dim InsPt = ?????????????
Message 7 of 7
Anonymous
in reply to: Anonymous

dim InsPt as Object
Is return
InsPt(0) as X coor.
InsPt(1) as Y coor.
InsPt(2) as Z coor.

a écrit dans le message de news:
5087383@discussion.autodesk.com...
Ok, I got everything exept how I define the insertion point

Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common


dim InsPt = ?????????????

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost