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

VB.net sendstringtoexecute

1 REPLY 1
Reply
Message 1 of 2
bart_van_tuyl
1142 Views, 1 Reply

VB.net sendstringtoexecute

Hi I have the following VB.net code which works, but not how I would like. The code when net loaded and run inserts the dxf but still prompts for rotation and scale factor I thought I could set these seeing the sendstringtoexecute looks like common lisp but I can't archive my desierd result (I'm trying to insert with a scale factor of 1 and a rotation of 0)

Code as follows

Imports autodesk.autocad.applicationservices
Imports autodesk.AutoCAD.editorinput
Imports autodesk.AutoCAD.runtime

Public class class1
<command method("insblk")>
Public sub insblk()
Dim a doc as document = application.documentmanager.mdiactivedocument
A doc.senstringtoexecute("._insert c:\test.dxf" , false, false, false)
End sub
End class
1 REPLY 1
Message 2 of 2
Keith.Brown
in reply to: bart_van_tuyl

SendStringToExecute will do exactly what you want you just need to give it the right information.  In your example above you are only telling it the drawing to insert.  You did not give it the scale factor or the rotation information.

 

so your SendStringToExecute line.

 

doc.sendstringtoexecute("._insert c:\test.dxf" , false, false, false)

 

would become something like this.

 

doc.sendstringtoexecute("._insert c:\test.dxf 1 0" , false, false, false)

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