.NET

.NET

Reply
Contributor
prakasht66
Posts: 24
Registered: ‎05-11-2013
Message 1 of 3 (160 Views)

How to find the section view names from the drawing

160 Views, 2 Replies
05-14-2013 01:47 AM

Hi all, I need to change the section view name height..I can able to collect all the text and also able to change the height.

But only for the view names i need to change the height.Im using COM API...here is my code.Thanks in advance

 

//why i used 3 here is ,because section view name strings  will be like" A-A"

//im also try to assign color for the view name
                   if (acadText.EntityName.Length.Equals(3))
                   {
                      
                       acadText.Height = 6.0;
                       AcadAcCmColor sectionViewTextColor = acadText.TrueColor;
                       sectionViewTextColor.ColorIndex = AcColor.acMagenta;
                       acadText.TrueColor = sectionViewTextColor;
                       acadText.update();

                   }

I dont know how to use split command,what are the arguments to pass for that
 

ADN Support Specialist
Balaji_Ram
Posts: 749
Registered: ‎03-21-2011
Message 2 of 3 (137 Views)

Re: How to find the section view names from the drawing

05-23-2013 04:45 AM in reply to: prakasht66

Hi Prakash,

 

Sorry for the delay.

 

Can you please provide a sample drawing and show the information that you are trying to retrieve ?

 

The model documentation API is limited at present and the information that you provide can help in finding out if that is possible using the API.

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Contributor
prakasht66
Posts: 24
Registered: ‎05-11-2013
Message 3 of 3 (123 Views)

Re: How to find the section view names from the drawing

05-25-2013 02:08 AM in reply to: Balaji_Ram

Thanks Balaji ,but  i found the answer for that.here is the code:

 

 if (acadText.TextString.Length.Equals(3))
                    {
                        string[] strs = acadText.TextString.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);

                        foreach (string ss in strs)
                        {

                            if (ss.StartsWith("A") && ss.EndsWith("A") || ss.StartsWith("B") && ss.EndsWith("B") || ss.StartsWith("C") && ss.EndsWith("C"))
                            {
                                acadText.Height = 6.0;
                                AcadAcCmColor sectionViewTextColor = acadText.TrueColor;
                                sectionViewTextColor.ColorIndex = AcColor.acMagenta;
                                acadText.TrueColor = sectionViewTextColor;
                                acadText.Update();

                            }

   }

                    }

 

But now i have another issue in creating layouts for the sheets present in the modelspace..

 

for example if have 3 sheets in model space.i need to create 3 layouts for each drawing sheet...Until now I am able to zoom the sheets individually(by get boundingbox).But how to place that particualr portion in layout..Im Using COM API..See my attachment here i created the layouts manually.(Layout1Layout2Layout3) ...but how to do that in coding...give some examples....Thanks alot......

                     

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.