.NET

Reply
Active Member
prakasht66
Posts: 9
Registered: ‎05-11-2013
Message 1 of 3 (144 Views)

How to find the section view names from the drawing

144 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: 660
Registered: ‎03-21-2011
Message 2 of 3 (121 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

Active Member
prakasht66
Posts: 9
Registered: ‎05-11-2013
Message 3 of 3 (107 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......

                     

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