Hello everyone! I'm currently trying to automate the use of the Label Display tool in Bentley Facilities Planner. My goal is to create a script that I could batch run in several files to achieve the mentioned labelling.
I'm using Microstation CONNECT Edition.
I have experience with VBA Macros in Office and LISP in AutoCAD but I'm knew to programming in Microstation so any kind of guidance would be much aprecciated.
Should I use VBA Macros or something else?
How can I find the right commands to automate the use of this tool?
Thank you in advance.
Best Regards
Allow me to explain a bit further what I want to accomplish. I wish to create a script to label the rooms of several files according to a template. The general goal is to have each room in each of the files labelled with a room stamp (Microstation Cell/AutoCAD Block) cointaing information of the rooms. This files I will later convert into DWG files. I have created a script to take text files inside polygons in AutoCAD (AutoLISP) and create the room stamps (AutoCAD Blocks with attributes), but for this I need to import the information for each room via labelling as text objects inside the polygons before DWG conversion. Once I achieve this I was also thinking about creating the room stamps entirely in BFP to avoid the use of AutoCAD. What are your thoughts on this? Am I on the right track? Any help would be much aprecciated.
Allow me to explain a bit further what I want to accomplish.
I wish to create a script to label the rooms of several files according to a template. The general goal is to have each room in each of the files labelled with a room stamp (Microstation Cell/AutoCAD Block) cointaing information of the rooms. This files I will later convert into DWG files.
I have created a script to take text files inside polygons in AutoCAD (AutoLISP) and create the room stamps (AutoCAD Blocks with attributes), but for this I need to import the information for each room via labelling as text objects inside the polygons before DWG conversion.
Once I achieve this I was also thinking about creating the room stamps entirely in BFP to avoid the use of AutoCAD.
What are your thoughts on this? Am I on the right track? Any help would be much aprecciated.
Hi Federico,
Federico Arroyo said:trying to automate the use of the Label Display tool in Bentley Facilities Planner.
I recommend to move your question to OpenBuildings forum, because this is MicroStation Programming forum and your question is about specific Facilities Planner tool. To move existing discussion, use More > Move tool available under your original post.
I also recommend to read and follow the best practices, especially to exactly specify product and its version (e.g. using build number).
Federico Arroyo said:but I'm knew to programming in Microstation so any kind of guidance would be much aprecciated.
You do not specify the version you use (V8i or CONNECT Edition), but in general, you can find some tutorials on Internet:
... and of course, it's worth to read MicroStation help as well as MicroStation VBA help, both delivered together with all MicroStation based products.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
Thank you for your reply. I have duly changed the topic to the forum suggested and added some more information in the question.
Thanks a lot Kestutis, I will go through your explanation. Any idea on how to get the classes' and attributes' ID for the things I want to label?
All IDs are presented in ProjectWise Class Editor
Best Regards,Kestutis Mitkus
Application Engineer, Building, Structural & Plant
Hello Kestutis!
Thanks for the help!
I actually dont have access to the PW Class Editor in my computer, is there other way to find out the ClassID's?
When just running
bf display label display
I only get the Labelling Tool window to open up.
Best regards!
Hi Frederico,
You should find this if you download and install the ProjectWise administration tools:
Marc
Hello Federico,
Unfortunately I don't know other tool, which could show us Class IDs and yes Marc is right, you can get this tool after you will install ProjectWise Administrator.bf display command should be used with Class ID and Attribute ID numbers, otherwise it will just open labeling dialog.Using ProjectWise Class Editor you will get not only ID numbers, but full administrative functionalities and options to manage your Bentley Facilities configuration.
Hi Federiko,
If you don't have opportunity to install ProjectWise Class Editor, then you can find class ID numbers directly in your database tables. In below picture is example from SQL database, where we have dbo.ODS_CLASS table, which has a list of all classes with their ID numbers.
same for Attributes.
Were you able to use Labeling tool suggestion? Regarding CLASSID value I think you should be able to get it from your support, because I have helped them to fix ProjectWise Class Editor, which can display all information. This way you don't need to search in Database for them. If you need any assistance with this Labeling tool, then We can have a live meeting and together with Afroja we can find all required IDs.As well I believe we can create VBA script, which can help you in achieving your labeling requirement.