I can't understand what XlSaveAsAccessMode is, can someone explain it? - excel

I need to know how this enumeration works, but consulting the documentation was not very helpful. I know it's a parameter for saving an Excel workbook and I know it goes from 1-3.
This doesn't help me understand the difference however and I can't seem to find any resources that do so. I would be very grateful if anyone can explain to me what this is used for?

XlSaveAsAccessMode Enumeration (Excel) has:
Name Value Description
xlExclusive 3 Exclusive mode
xlNoChange 1 Default (does not change the access mode)
xlShared 2 Share list
I think basically just a control over whether another instance/application may or may not write to the file during its save operation.

Related

Accessing Area.Name Throws Error

I'm just trying to find a way to access the name property of an Area element inside Revit Python Shell, tried looking on Jeremy Tammik's amazingly informative blog, tried AUGI, Revit API docs, been looking for 2 days now...
Tried accessing via a bunch of ways, FilteredElementsCollector(doc).OfCategory(BuiltInCategory.OST_Areas), tried by Area class, tried through AreaTag, every single time I get an error under every circumstance and it's driving me nuts, it seems like such a simple issue that I can't seem to grasp!
EDIT: Also tried by element id, through tags, through area schemes, nada, no go...
Can anyone please tell me how to access this property via RPS?
I would say two things:
areaObject.LookupParameter("Name")
areaObject.GetParameters("Name")
...are valid methods. Please notice how I used GetParameters() NOT GetParameter(). There are some drawbacks to using either one of the two. The lookup method will return FIRST parameter that matches the name which in many cases might be a different parameter for different elements. It's not very reliable.
GetParameters() method will return them all if there are multiple so then you have to deal with a List<Parameter> rather than a single object that you can extract your value from.
I would personally recommend to use areaObject.get_Parameter(BuiltInParameter.ROOM_NAME) method to extract a Name value from Area object. The BuiltInParameter always points at the same parameter, and will reliably return just that one parameter. Here's a little more details about these methods:
http://www.revitapidocs.com/2018/4400b9f8-3787-0947-5113-2522ff5e5de2.htm
To answer my own question, I actually never thought of looking through the code of other Revit Python scripts... in this case of PyRevit, which is in my opinion far more eloquently written than RPS, raelly looking forward for their console work to be done!
Basically, I had mistakenly used GetParameter('parameter') instead of LookupParameter('parameter').
As I said, it was something stupidly simple that I just didn't understand.
If anyone has sufficient knowledge to coherently clarify this, please do answer!
Many thanks!
Maybe your issue is the same as this one ? :
https://groups.google.com/forum/#!searchin/RevitPythonShell/name|sort:relevance/revitpythonshell/uaxB1FLXG80/sdJNrTfoPuUJ
Your_Area.Name # throws error
Element.Name.GetValue(Your_Area) # works great

Using the "extends" functionality in drools spreadsheets?

I have a question about using a certian drools functionality in drools decision spreadsheet, that would help a lot in reducing the files and making them more readable.
I can't add more than two links so please downlad this .zip file that includes:
Version1.PNG, Version1.drl, Version2.PNG, Version2.drl, Version3desired.drl
http://s000.tinyupload.com/?file_id=89653236807266194978
So here is the sample rule that we are using right now (something similar)Version1.PNG
And this when converted to a drl gives us the following 193 line long drl file. (Version1.drl)
It is ok and it works well, but after some research we found out we could use the "extends" functionality in drl.
And it works in a drl, what I would like to know is how would I use it in an Excel spreadsheet?
I designed the rule in this way: Version2.PNG
Clearly this is not how "extends" should be used in Excel, since this returns the following drl (Version2.drl)
You can see the extends is inside the "" of the rule name. Makes sense I guess, what I woudl like to know however is, how would I use it correctly? a seperate column? That didn't work, at least not the way I did it.
Does anyone know how It should be done?
The correct DRL that should be made after the Excel is converted is this: (Version3desired.drl)
Thank you for any help :)
Cheers!
There is no gain in using extends with spreadsheets in the way you describe it in your question.
I suggest that you stick to the spreadsheet layout shown in Version1.png. If data entry personnel complains about the dull repetition of 1/7/30 in oodles of rows, teach them how to join cells so they need to type each value only once.

Azure Search suggestions setup

I've created an instance of Azure Search and I'm trying to make use of the suggesters functionality but struggling to find any useful information on how to get started (poor and out of date documentation from Microsoft).
I would like to use a suggestion on the name field below.
The issue is that fields require unique names and I'm unable to edit existing fields. I'm a little unsure of how the suggester tab differs from basic.
Does anyone have any advice on how best to add suggesters to my index? I am all for deleting the index and starting again if I've missed something critical.
I'm really sorry you're disappointed by the documentation. We take it very seriously and will make sure to address your feedback. Feel free to make suggestions.
On the screen you provided, you should specify a name for the suggester. Once you do that, checkboxes will show up next to your field names. Using the check boxes you will enable the Suggestions API on selected fields.
Use the name of the suggester as a value for the suggesterName parameter when using the Suggestions API : https://msdn.microsoft.com/en-us/library/azure/dn798936.aspx
Please find more details in this article about suggestions in Azure Search. It describes a sample application with code attached.
Hope that helps.

Where can I find a simple and useful list of VBA objects and methods for a beginner?

I tried pressing f2 to get the VBE thingo open and it just looks like jibberish to me.
I need something nice and simple which gives me a heirachy of what key words to use and where to put the dots so that I can do what I need to do and start learning this lanauge.
h = Worksheets("name_lists").range("g17").Offset(down, 0).Value
I don't know what worksheet is ? Is it a class with object range calling method offset ?
I need some sort of a resource to see what functionality is available but I can't make VBE do what I want.
Can someone please help me.
Thanks.
What you are asking for is at http://msdn.microsoft.com/en-us/library/office/ff194068(v=office.15).aspx. This should help you with documentation about individual objects and their properties/methods.
As for what functionality is available: (just about) everything you can do with the Office suite can be accessed through VBA. A good first step is to record a macro, and then try to follow the generated code. The caveat with that approach is that the recorder LOVES to use .Select and Selection., which is generally bad practice.
And, when you have a specific question you can't figure out, ask it here.

IW31 searching for a user exit or enh. point to get gsber

I am working with transaction IW31, the task is to rewrite the field of gsber with another value during the save process (when I clicked the save button this function should be activated at this time).
I had seen all the relevant user exit and enhancement point corresponding to transaction iw31 but no success. I couldn't find any point where I can get the whole CAUFVD structure (it contains the field gsber).
I would need a user point where I can import this structure, not only export.
Could anybody help me solving this task? Or do I need to create an implicit point because the lack of User-Exit?
Thank you in advance,
Gabor
Which SAP Release do you use?
Have you checked the Include LCOIHF2V? There you will find the Enhancement Point FCODE_BU2_01 in which you have full access to structure CAUFVD.
ENHANCEMENT-POINT FCODE_BU2_01 SPOTS ES_SAPLCOIH STATIC.
In addition you have of course always the possibility to add an implicit enhancement (as you suggested) at the end of this form routine.
Hope this helps!

Resources