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
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.
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......