.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to find the section view names from the drawing

2 REPLIES 2
Reply
Message 1 of 3
prakasht66
325 Views, 2 Replies

How to find the section view names from the drawing

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
 

2 REPLIES 2
Message 2 of 3
Balaji_Ram
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

Message 3 of 3
prakasht66
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......

                     

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost