Hi again to everybody ,
Anybody knows , how can I get the value of the attributes of the active settings when are bylevel ??.
With this code , I get the value , but if are bylevel it returns me -1 or bylevel ... any idea???
Thanks !!
With ActiveSettings Main.txtColor.Text = .color Main.txtNivell.Text = .Level.Name Main.txtGruix.Text = .LineWeight Main.txtEstil.Text = .LineStyle.Name Main.txtCella.Text = "" Main.chkCella.Value = False Main.txtTipus.Text = -1 Main.txtClasse.Text = -1 End With
Ok Jan , always so much apreciated your critery ... yes know I see that is wrong , thanks for the adjust.Best regards !!
Hi Xavi,
Unknown said:nybody knows , how can I get the value of the attributes of the active settings when are bylevel ??.
It's a misapprehension how MicroStation works. If active attribute is -1, it's the attribute value, no other value exists. Correct question is "how an appropriate (active) level is defined".
Unknown said:if it could help somebody
Sorry, but this code is wrong ... better to say extremely inefficient, because any query for level settings requires to iterate through all levels in active design file.This code should be enough:
Dim lvlColor As Long lvlColor = ActiveSettings.Level.ElementColor
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point