I have the object is the default Angle cell is 0 ° I want to rotate the object to the horizontal that coincides with the X axis of Microstaion V8i,
My idea is to select objects using MicroStation V8i selection tool
This can be handled by VBA Microstation, hope everyone in the forum help me, thank you very much
Hi,
as Jon wrote, if there is no a specific reason to use VBA, it's probably better to ask in MicroStation Forum and to discuss how to do it using normal MicroStation tools.
Doan Nguyen Thuc said:I have the object is the default Angle cell is 0 ° I want to rotate the object to the horizontal that coincides with the X axis of Microstaion V8i,
On the other hand, based on this information, I am not quite sure whether it can be solved by user tool only.
I recommend to share an example file. If 0° is the first (rotated) text, it will require to analyse text inside the cell and to rotate the cell in an opposite direction, where VBA will be required.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
It's like rotating using the V8i' RE command, but Re does not rotate multiple objects at once, I want to use VBA to rotate multiple objects at once, by selecting select then VBA will automatically rotate the object. in the north, because I do not know about programming so I can not write it myself, I hope people help me to save more time. I have the v8i file attached to this link. Best regards
www.mediafire.com/.../DC03.dgn
Doan Nguyen Thuc said:can you make VBA help me a little bit
honestly and with all respect, no. You started the discussion in Programmin forum, so there is an expectation you have at least basic programming knowledge. To modify working code to enumerate selection set and not active model is quite simple task. Or you can implement ILocateCommandEvents object to create own element selection tool. There are examples in MicroStation VBA help how to do it.
There is also another aspect: We all participate in discussions in our free time. I have verified several times that to provide anything more than what I am able to write (or often to stick from existing code snippets) in a few minutes, e.g. to modify code accordingly to people requirements, because they are not willing to invest own time to study and enhance their development skills, ends not only with lack of mz time, but also with general expectation people can ask and somebody will write a code for them.
I apologize to Jan because I do not know anything about programming so I'm asking you such silly questions.
Actually I do not know about programming, I want to learn it but I have not found the document, please help me.
Doan Nguyen Thuc said:I do not know about programming, I want to learn it
Microsoft VBA appears in many applications besides MicroStation. Microsoft's Office products include VBA. There are many books, websites and training courses dedicated to VBA.
I suggest that you start with, say, Microsoft Excel. Here are a few web sites that deal with Excel VBA programming...
Regards, Jon Summers LA Solutions
Dear Jon, thank you for this. I want to learn VBA programming in Microstation V8i, because I have to work on V8i every day, but if I learn VBA Excel is good but I have very little time, I Want to learn VBA right on the V8i to solve work quickly and save time.
Doan Nguyen Thuc said:I want to learn VBA programming in Microstation V8i
Before you can learn how to use VBA in MicroStation, you have to learn VBA language itself. VBA is the same for all applications regardless it's Excel or MicroStation, only "application API" is different. It means you can use sources mentioned by Jon for the first step and utilize they are available for free.
With a knowledge of VBA language you can use MicroStation VBA help (delivered with MicroStation) and examples (code snippets) available in the help file. You can also check content of \WorkSpace\System\vba\examples folder. In combination with VBA documentation (available as part of VBA editor) it can be used as a rich self-study resource.
If you want to have "all in one", you can buy Learning MicroStation VBA book available at Bentley Store or from Amazon. It contains both introduction into VBA langauge and explanation of MicroStation VBA API.
Hellotry watching this
https://communities.bentley.com/communities/other_communities/askinga/w/askinga/3313/active-angle-assistant-macro
I would like to thank you very much for your valuable suggestions, hopefully I will learn and write my own VBA, Mr. Jan, now I do not know how to fix the VBA that he wrote me. On top of that, annoying him for editing I can select with the Element Selection, because I do not want to change the rotation for all the objects I want to change for the selected objects only. Thank you and wish you good health.
Thank you I tried the active-angle-assistant macro but it does not change the angle as I can.
Xin chào jan, tôi đang học VBA lập trình, tôi đang cố gắng trong việc tạo ra một văn bản nghĩa Tiếng Viết là "Sông" nhưng tôi không biết làm sao để viết dấu của Tiếng Viết trong VBA trên V8i, mong ông giúp đỡ
Linh Tran said:Xin chào jan, tôi đang học VBA lập trình