I am updating a VBA that runs fine in v8i to run in Connect.
The only part not working is adding text elements added by the vba to a graphic group. It does add new line elements, but text is not added to the GG.
In v8i at the end of the VBA run, all elements are in a GG, but in Connect they are not, only the lines are. If I run it in v8i and then open the file in Connect, the GG is recognized by Connect.
Code is something like this:
ActiveSettings.CurrentGraphicGroup = Application.UpdateGraphicGroupNumber..Add line and text elements by sending keyins using CadInputQueueActiveSettings.CurrentGraphicGroup = 0
I have tested to create Text using the function CreateTextElement1 with correct results, the graphicgroup number was correct assigned.If you are using recorded code to place text, this may differ between V8i and CONNECT Edition.Could you please provide a complete test case to allow us to reproduce the issue and the product with complete version number you are using - thank you.
Hello, I have Microstation CE 10.14 and I am encountering the same problem...
I need the user to enter a text via the place Icon tool and then assign the graphic group among other variable.
The graphic group is not assigned to the text element (however, this works in Microstation 8i)My code goes like this :
ActiveSettings.LineWeight = 12 ActiveSettings.LineStyle = ActiveDesignFile.LineStyles(1) CadInputQueue.SendCommand "active level 20" ActiveSettings.Color = 31 'ActiveSettings.TextStyle.Font = ActiveDesignFile.Fonts(51) CadInputQueue.SendKeyin "TEXTSTYLESET FONT ""fonte51.rsc"" ""Style (none)""" ActiveSettings.TextStyle.Height = 30 ActiveSettings.TextStyle.Width = 60 ActiveSettings.CurrentGraphicGroup = 21301 CadInputQueiue.SendComimand "PLACE DIALOGTEXT ICON"
Thanks in advance for any help :-)
thank you for providing this code example, a test confirmed the issue, which is a regression from V8i.From first tests this is affecting keyins like "place text", place dialogtext" and "place cell".This is not affecting VBA methods like CreatTextElement1 to place text.
I have filed Defect 1109439 to address this issue.One workaround for this code example would be to explicitly assign the Graphic group number directly after placing the Text like this:
Dim ele As element
Set ele = ActiveModelReference.GetLastValidGraphicalElement
ele.GraphicGroup = ActiveSettings.CurrentGraphicGroup
Thank you for your follow up.