hi,
i am getting this error as Active model reference is not set
can any body help me out
thanks
Praveen E
praveeneswarrao: hi, i am getting this error as Active model reference is not set can any body help me out thanks Praveen E
What about the word 'Set' at the beginning of that line?
/Rob
CADMinistrator ®
actually i am doing in C# code so no need to use set . i tryed it is agian showing error.
Set element=Activemodelreferenc,getselectedelements '''in VBA
element=application.Activemodelreferenc,getselectedelements(); in C# // but it is throwing the error as in the JPG
Praveen: element=application.Activemodelreferenc,getselectedelements(); in C# // but it is throwing the error as in the JPG
What is the declaration of element?
Regards, Jon Summers LA Solutions
it is elementenumerator.
oElEnum = Application.ActiveModelReference.GetSelectedElements();
now it is woring fine when i restarted the system.........
what if it comes again the same error how we need to handle it or we need to set in bentley Map XM any model reference?
please help...
- praveen E
praveeneswarrao: it is elementenumerator. oElEnum = Application.ActiveModelReference.GetSelectedElements();
It sounds like the variable you used was a 'preserved' name or object name. For example declaring an Element as element may create a conflict.
For example 'Dim element As Element' or 'Dim elementenumerator As ElementEnumerator' can create unwanted or unexpected errors or results..
Perhaps if your element has been declared elsewhere or is uncleared may cause the same unexpected error or result..
Hope This Helps.
Praveen: "What is the declaration of element?" it is elementenumerator. oElEnum = Application.ActiveModelReference.GetSelectedElements();
Well, I had guessed that it is an element enumerator. However, this is a programming forum, and you asked a question about program code.
When I ask a question such as "What is the declaration of element?", I expect an answer in the form that you write it in code. For example: ElementEnumerator oEnumerator; Why?
ElementEnumerator oEnumerator;
As an example, your previous posting included this line:
application.Activemodelreferenc,getselectedelements();
That line would not be accepted by the C# editor, nor would it have compiled. It's best to copy-and-paste from your code; retyping code introduces human errors that may not be present in the original.
sorry for that and thanks for the suggestion.
jon and thex...