I've been advised to post the below question in a specific vba forum rather than in the general microstation forum. Since the question applies to both v8i and XM release, I hope for understanding that I will post it in both forums.
Dear community,
I am currently writing a vba script, and at a certain point of a longer procedure I want to copy a tag and drop the copied element to a text element.
The copying works fine, it returns another Ustn Element Type 37 / tag (which looses its linkage as shown with the 'broken' symbology) , that's how it should be.
Now surprisingly the Element.IsDroppableElement returns false.
I would prefer a solution other than using CadInputQueue in conjunction with the command 'change tags droptext', as using this option slows down the execution of the routine notably.
Thank you in advance for any helpful hints.
Andreas
The simple answer is that TagElements are not some complex form of TextElements and cannot be 'dropped' to text, irrespective of what MicroStation's user interface may lead you believe. To put it another way, there is no TagElement.Drop method.
However, a reasonable answer is not far away. A TagElement can store various types of data (in VBA terms, a TagElement may be a String, Integer, or Double). The TagElement.Value property gets the internal value of the tag as a VB Variant type.
To 'drop' a TagElement to a TextElement, do something like this …
Regards, Jon Summers LA Solutions
Hello,
is there any reason why you cannot use the command:
change tags droptext
Best regards,
Henk