.NET

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

Adding MText to AutoCAD using Visual Studio 2012

339 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
fieldguy
Posts: 366
Registered: ‎03-31-2005
Message 2 of 6 (321 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 (296 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: 366
Registered: ‎03-31-2005
Message 4 of 6 (275 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 (259 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 (229 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
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

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

Ask the Community