What is the difference between "AT+QIACT" and "AT+CGDCONT" - m2m

I have Quectel-EC21 LTE module but have a little problem to initialize.
I have really confused about "AT+QIACT" and "AT+CGDCONT" commands.
Both actived PDP context but dont know what is the difference between.
I will have APN name, username and password.
For that reason as I understand I may not use "AT+CGDCONT" command.
Can anyone help me ?
Thanks in advance

An old question, but just in case anyone else has the same doubt.
"AT+CGDCONT" does not activate a PDP context but instead defines the PDP context with a context ID.
"AT+QIACT" write command activates the defined PDP context using the context ID.
Try activating a PDP context without defining it, you will get an error.

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

Setting the CompoundStructure.EndCap is not working

I am working on a Revit plugin using RevitAPI.
I create a new WallType by duplicating existing one. Then I edit the structure - adding new layers.
Also, I am setting the OpeningWrapping to Both and I want to set the EndCap to Interior.
Unfortunately, the EndCap never changes and stays Exterior
structure.EndCap = EndCapCondition.Interior;
structure.OpeningWrapping = OpeningWrappingCondition.ExteriorAndInterior;
Does someone have any ideas about why it is not changing?
Thank you in advance!
Ivan
There could be many possible reasons.
Can you set the desired end cap behaviour manually through the user interface?
If not, it will normally not be possible to do so programmatically either.
Do you have an open transaction?
Can you commit other changes in it?
Are you applying other changes to the model that might conflict with the end cap condition?
Instead of asking you hundreds of questions, I suggest that you provide a minimal reproducible case:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b
p.s. the same question is also asked and further discussed here:
https://forums.autodesk.com/t5/revit-api-forum/compoundstructure-endcap-is-not-working/m-p/6898895

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!

Plugin not creating new record, but giving SQL timeout [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I've created a plugin to create new records when a field changes on another record. I've set it all up but when I run it no records are created and CRM returns a SQL Timeout error. My code is below:
Entity contactSecurityRole = new Entity("sb_contactsecurityrole");
contactSecurityRole["sb_contactid"] = linkedContact;
contactSecurityRole["sb_contactportalsettingid"] = linkedContactPortalSetting;
contactSecurityRole["sb_portalsettingid"] = linkedPortalSetting;
contactSecurityRole["sb_portalsecurityroleid"] = linkedSecurityRole;
Service.Create(contactSecurityRole);
All the variables with a name starting "linked" are entity references to other entities, as the record is made up of lookup fields. I've done some checking and where it stops is where it comes to the actual Service.Create() part.
Can someone give me some tips on what to check so I can find why this is happening?
Update:
I've found the issue, and Greg was right it was a problem outside of the code I posted above. The issue was how I was setting up one of my "linked" variables, I was attempting to use a fetch request to retrieve a Guid for the record i needed to link to, from which I was setting up an entityreference.
The mistake I made was thinking that the fetch returned a Guid whereas it was actually returning an entityreference itself. So once I got that fixed the code ran through almost immediately. My guess was that because I was setting it up wrong, when it came to creating the entity CRM/SQL Server could enter the value so it returned the error.
Thanks for everybody's help with this
This will provide you some more clarity and the solution
I had this problem when I registerd the plugins in Sandbox in one of my CRM instances, which you should be doing, as its good practice. BUT try registering your plugins in non-Sandbox mode and than try creating a record, it might solve your issue.
It makes sense that any exception would be on the Service.Create(... part since this is the point at which the code tries to access CRM (and therefore the underlying SQL table).
Is it possible that you have other plug-ins registered which may be triggered during this process? Are you running on-premise or on-line?
I've found the issue, and Greg was right it was a problem outside of the code I posted above. The issue was how I was setting up one of my "linked" variables, I was attempting to use a fetch request to retrieve a Guid for the record i needed to link to, from which I was setting up an entityreference.
The mistake I made was thinking that the fetch returned a Guid whereas it was actually returning an entityreference itself. So once I got that fixed the code ran through almost immediately. My guess was that because I was setting it up wrong, when it came to creating the entity CRM/SQL Server could enter the value so it returned the error.
Thanks for everybody's help with this

How to write text values in masked field?

i need some help related to masked field in web form. Syntax of phone field is (___)___-_____, if i execute this code in ruby shell
browser.text_field(:id => 'txtphone').set '7893457889'
... nothing has been added in the phone field.
then i find this solution in one blog, someone said first unmask this field using this code.
browser.text_field(:id,'txtphone').fire_event("unmask")
then write the above code again.
browser.text_field(:id => 'txtphone').set '7893457889'
but still nothing has happened. kindly help me out...am i doing right or still there is a mistake.
If you could provide some sample of the page HTML it will be easier to give you an answer more likely to work.
Given what you have provided us to work from, we have to go with the normal way that such masked input fields typically work and go from there. Usually pages with this kind of thing are calling a javascript function which is triggered by a specific event. Most often this is an event such as onchange but it may be something like keypress or any other even that happens when a normal user types or pasts text into the cell.
You likely need to experiment with using the '.fire_event' method to fire the proper javascript event, or if that fails entirely making a direct call to execute the proper script
When doing this do not confuse the name of a script such as 'applymask' or somesuch with the javascript event which causes that script to be invoked.
The answers to this question How to find out which JavaScript events fired? include some good information on how to use firebug or the chrome developer tools to figure out what events are being fired when you interact with an object on the browser screen.
Update: instead of responding here to indicate if this answer was of any use the OP reposted their question here Masked Text Box issue and by digging around on the vendor's demo site (since that time he actually had posted some of the HTML when we asked for it) I was able to find a solution using watir-webdriver that worked for him.

Resources