I've looked all over the internet for some documentation regarding the writing of UCM files, but alas, I cannot find anything!
We're currently using MicroStation SE, so I believe the best (if not only) way of having this coding, is to use the UCM files.
Does anyone have any documentation or user guides for writing or understanding UCM coding? I'm currently trying to work out what APCOLS, APTSCL, FBFDCN, CUGRAF and NULCMD all mean.
Any help would be gratefully received, as this is becoming a bit of a pain!
pjpops said:Does anyone have any documentation or user guides for writing or understanding UCM coding?
Anyone who admits to knowing that stuff is likely to keep quiet about it. Either that, or they retired many years ago.
Take Jan's advice: move to BASIC. Why ... ?
pjpops said:I'm currently trying to work out what APCOLS, APTSCL, FBFDCN, CUGRAF and NULCMD all mean.
... that's why. UCMs are hard to read. They are terse, inflexible, lack documentation, and once written are an archtypical example of write-only code.
BASIC includes a macro recorder. That will give you a helping hand to get going.
pjpops said:We're currently using MicroStation SE
Presumably you're stuck with MicroStation SE for a good reason?
pjpops said:Hopefully we'll get V8i soon
V8i provides Microsoft Visual Basic for Applications (VBA). VBA is even better than BASIC. If you start writing BASIC in SE, you'll be pleasantly surprised at what you'll be able to achieve with VBA.
On the other hand, UCMs, while supported in V8i, don't provide access to areas of MicroStation. You'll remain stranded, programatically speaking, in the 1980s (which is when UCMs originated).
Regards, Jon Summers LA Solutions
We're basically stuck with SE due to budgeting and the cost implications of introducing V8i across the company.
It would be good to use BASIC, but I'm currently working out how to edit .bas files and even how to assign them to toolbars. There seems to be very little help for using SE (rightfully so, as it hasn't been supported by Bentley for quite some time now!), so this is proving fairly tricky.
I will endeavour to try and work out some BASIC coding, but at the moment, I'm finding it hard to find much documentation which starts at the basics.
Thanks again for your help guys and wish me luck!
I am such a pack rat.
Here is a copy of one chapter from MicroStation 95's manuals in PDF format. It has some documentation on UCM's. I hope Bentley does not mind me posting their own documents on their own forum.
You want to try to understand what the UCM does and then recreate it in MicroStation Basic AKA MBE. Those skills will translate to VBA when you finally upgrade.
As I recall, CUGRAF refers to the current graphic group number - that is used to read and save it. There is an equivalent in MBE and VBA. NULCMD is the same as keying in NULL and basically Makes MicroStation have no active command. The other two are Active pattern column spacing and active pattern scale. Those last two are in the PDF I am posting.
All of these have equivalent methops or properties in MBE and VBA.
Jon, I actually took the VAX VSIO (if that is the right acronym) class for IGDS, where we learned all about the ISFF and TCB. I finally got a chance to use binary numbers after learning them so long ago! And I am neither retired nor unwilling to admit I actually enjoyed working on UCM's! LOL
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration
caddcop said: I am neither retired nor unwilling to admit I actually enjoyed working on UCM's!
You're a brave man, Chuck! I have enough trouble keeping up with today's technologies.
Thank you so much for that pdf, it's exactly what I was after!
At least I'll be able to work out what some of the coding actually means now.
Am I right in thinking that the .bas files will work ok in v8i? If not, would it be easy to convert them to VBA?
Thanks again for your help Jon, you've really helped in my understanding.
pjpops said:Am I right in thinking that the .bas files will work ok in v8i?
They may work. MicroStation BASIC has been left to atrophy. For example, BASIC doesn't handle levels particularly well in V8 (but still that's better than UCMs, which don't handle levels at all in V8).
pjpops said:Would it be easy to convert from BASIC to VBA?
BASIC is, well, basic, compared to VBA. I think that anything you can do with BASIC is reasonably straightforward to convert to VBA. Somethings are so much easier in VBA, but handled differently, that a straightforward conversion from BASIC to VBA is not always the best way.
That said, it's going to be easier to convert to VBA from BASIC than from UCMs.
Let me put this another way.
Whether you write UCMs or BASIC today, you have to learn a new technology.
Does that make it easier to choose one over the other?
I think it may be time to drag out MicroStation support person out of the dark ages and in to the 21st century!
I'll get my head around BASIC coding and then make the change to VBA once we have v8i.
I've been having a play around with macros and I'm liking the way that it actually records your inputs, rather than having to guess what the UCM wants you to input and try to learn from your mistakes!!
Thanks again for your help guys, it really has helped an awful lot!