.NET

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

Adding MText to AutoCAD using Visual Studio 2012

298 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

Valued Mentor
Posts: 358
Registered: ‎03-31-2005
Message 2 of 6 (280 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
Posts: 4
Registered: ‎06-14-2013
Message 3 of 6 (255 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
Posts: 358
Registered: ‎03-31-2005
Message 4 of 6 (234 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
Posts: 4
Registered: ‎06-14-2013
Message 5 of 6 (218 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
Posts: 4
Registered: ‎06-14-2013
Message 6 of 6 (188 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!!

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community