.NET

.NET

Reply
Member
EasyA
Posts: 4
Registered: ‎06-14-2013
Message 1 of 6 (377 Views)
Accepted Solution

Adding MText to AutoCAD using Visual Studio 2012

377 Views, 5 Replies
06-14-2013 08:54 AM

I'm relatively new to programming. I'm using Visual Studio 2012. The department is using AutoCAD 2013

 

I'm working on a program that adds the general notes to our drawings. The program does what I need it to do with one exception. The notes consist of multiple MText entries. When I click the "GENERAL NOTES" button to insert the notes, all the entries are compiled and inserted, but all at 0,0,0. I'm stuck at this point. Any help would be greatly appreciated.

 

Thanks

I wanted to let you know your solution works perfectly. I managed to work out the method for spacing the MText items using a value from the VBA program the new program is going to replace. At any rate, thanks for your help!!

Valued Mentor
fieldguy
Posts: 382
Registered: ‎03-31-2005
Message 2 of 6 (359 Views)

Re: Adding MText to AutoCAD using Visual Studio 2012

06-14-2013 01:08 PM in reply to: EasyA

Are you setting the location property?

 

Dim myMText As New MText
myMText.Location = new point3d(x,y,z)

 

You will have to confirm the correct syntax.

Member
EasyA
Posts: 4
Registered: ‎06-14-2013
Message 3 of 6 (334 Views)

Re: Adding MText to AutoCAD using Visual Studio 2012

06-15-2013 06:23 AM in reply to: EasyA

Thanks for your response. I was setting a location property but not by using a specific 3d point. I was using "middle top". Using a 3d point makes much more sense to me. Nothing like over looking the obvious. Do you have a method that will allow me to establish a specific space between each MText item?

 

Thanks again!

Valued Mentor
fieldguy
Posts: 382
Registered: ‎03-31-2005
Message 4 of 6 (313 Views)

Re: Adding MText to AutoCAD using Visual Studio 2012

06-17-2013 07:21 AM in reply to: EasyA

I have not done that in code.  I often make manual changes using the property dialog,  The screen shot shows an example of how you might do it.  Any property with a "set" method *should* be available. 

Member
EasyA
Posts: 4
Registered: ‎06-14-2013
Message 5 of 6 (297 Views)

Re: Adding MText to AutoCAD using Visual Studio 2012

06-17-2013 08:11 AM in reply to: EasyA

Thanks...

 

I'm going to the office on Wednesday and will let you know how your solutions workout. Thanks again for your help.

Member
EasyA
Posts: 4
Registered: ‎06-14-2013
Message 6 of 6 (267 Views)

Re: Adding MText to AutoCAD using Visual Studio 2012

06-19-2013 12:12 PM in reply to: EasyA

I wanted to let you know your solution works perfectly. I managed to work out the method for spacing the MText items using a value from the VBA program the new program is going to replace. At any rate, thanks for your help!!

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.