Category: News
How to Fix QuickBooks desktop 2024 keeps crashing?
My QuickBooks Desktop 2024 keeps crashing unexpectedly. How can I fix this issue and ensure smooth operation of the software?
My QuickBooks Desktop 2024 keeps crashing unexpectedly. How can I fix this issue and ensure smooth operation of the software? Read More
What are common causes and solutions for QuickBooks Payroll Error PS036?
I’m encountering QuickBooks Payroll Error PS036. How can I fix this issue and ensure my payroll runs smoothly?
I’m encountering QuickBooks Payroll Error PS036. How can I fix this issue and ensure my payroll runs smoothly? Read More
Excel Summing Formulas in Microsoft 365 Not Working Properly
Hello.
Since I signed up for the Family version of Microsoft 365, I have to manually re-enter my summing formulas each time I open the spreadsheet. Here is an example of the sum formula I’m using and shows how it didn’t calculate:
I’m using a PC laptop and the desktop version of Microsoft Excel 365.
Looking forward to seeing some suggestions. It’s not a hard thing to have to do each time; it’s just a pain in the butt.
Thank you.
Bkwerm88
Hello. Since I signed up for the Family version of Microsoft 365, I have to manually re-enter my summing formulas each time I open the spreadsheet. Here is an example of the sum formula I’m using and shows how it didn’t calculate: I’m using a PC laptop and the desktop version of Microsoft Excel 365.Looking forward to seeing some suggestions. It’s not a hard thing to have to do each time; it’s just a pain in the butt. Thank you.Bkwerm88 Read More
Really strange “graphics” issue in PowerPoint
I have a single, brand new, Lenovo t14s with AMD CPU, where the user is experiencing strange graphics behaviour in PowerPoint. Randomly elements (icons, text boxes, images etc.) on the slide becomes invisible / hidden, like a big white box. You cant select anything in the box or move the elements. When the user goes one slide forward and then returns, the sections / elements are visible again.
I have tried to update the AMD graphics drivers to the newest. Disabled hardware graphics acceleration in settings. Made a quick repair of Office. Made a web repair of Office (states it should resolve all errors)
We are running O365 Business Premium and using the Enterprise monthly release channel.
The computer is 3 weeks old, we have other af the same model, but haven’t heard from any other user about issues like this.
Have any of you seen an issue like this and know of a fix? – I can’t seem to find anything on google.
I have attached a screenshot of the issue, where there should have been a lot of content on the slide, but instead is a big white box.
I have a single, brand new, Lenovo t14s with AMD CPU, where the user is experiencing strange graphics behaviour in PowerPoint. Randomly elements (icons, text boxes, images etc.) on the slide becomes invisible / hidden, like a big white box. You cant select anything in the box or move the elements. When the user goes one slide forward and then returns, the sections / elements are visible again.I have tried to update the AMD graphics drivers to the newest. Disabled hardware graphics acceleration in settings. Made a quick repair of Office. Made a web repair of Office (states it should resolve all errors)We are running O365 Business Premium and using the Enterprise monthly release channel.The computer is 3 weeks old, we have other af the same model, but haven’t heard from any other user about issues like this.Have any of you seen an issue like this and know of a fix? – I can’t seem to find anything on google. I have attached a screenshot of the issue, where there should have been a lot of content on the slide, but instead is a big white box. Read More
Weird issue with MFA for Guest Users
Hey,
we have implemented MFA for external Guest Users in Entra ID. It is working fine for every external user so far. However, there are two users from the same external company who cannot get into our environment since the implementation. Both of them receive the following error when trying to login:
AADSTS500082: SAML assertion is not present in the token.
When I check their Sign-In Logs, I see this “error”:
User needs to perform multi-factor authentication. There could be multiple things requiring multi-factor, e.g. Conditional Access policies, per-user enforcement, requested by client, among others.
They also told me that they are not prompted with MFA. Their company does not have MFA configured. However, they are using MFA with other external environments just fine.
I tried revoking their MFA settings and their sessions. We also tried different browsers, private browser sessions and deleting cookies. Nothing has worked so far.
Does anyone have any idea what could cause these issues?
Hey, we have implemented MFA for external Guest Users in Entra ID. It is working fine for every external user so far. However, there are two users from the same external company who cannot get into our environment since the implementation. Both of them receive the following error when trying to login: AADSTS500082: SAML assertion is not present in the token. When I check their Sign-In Logs, I see this “error”:User needs to perform multi-factor authentication. There could be multiple things requiring multi-factor, e.g. Conditional Access policies, per-user enforcement, requested by client, among others. They also told me that they are not prompted with MFA. Their company does not have MFA configured. However, they are using MFA with other external environments just fine. I tried revoking their MFA settings and their sessions. We also tried different browsers, private browser sessions and deleting cookies. Nothing has worked so far. Does anyone have any idea what could cause these issues? Read More
What to do if Can’t Open Your Company File in QuickBooks Desktop
I’m encountering an issue where I can’t open my company file in QuickBooks Desktop. Every time I try, I receive an error message or the application freezes. What could be causing this problem, and how can I resolve it?
I’m encountering an issue where I can’t open my company file in QuickBooks Desktop. Every time I try, I receive an error message or the application freezes. What could be causing this problem, and how can I resolve it? Read More
New on Azure Marketplace: April 26-30, 2024
We continue to expand the Azure Marketplace ecosystem. For this volume, 110 new offers successfully met the onboarding criteria and went live. See details of the new offers below:
Get it now in our marketplace
Auto-sklearn on Debian 11: This machine-learning tool searches algorithms to find the best model for your data. The pre-configured image on Microsoft Azure simplifies deployment and offers consistent performance across different compute resources. Key features: efficiency, hyperparameter optimization, ensemble learning, open-source accessibility, and high performance. Apps4Rent provides support and expertise for deploying Auto-sklearn on Azure.
Auto-sklearn on Ubuntu 20.04 LTS: This machine-learning tool searches algorithms to find the best model for your data. The pre-configured image on Microsoft Azure simplifies deployment and offers consistent performance across different compute resources. Key features: efficiency, hyperparameter optimization, ensemble learning, open-source accessibility, and high performance. Apps4Rent provides support and expertise for deploying Auto-sklearn on Azure.
Auto-sklearn on Ubuntu 22.04 LTS: This machine-learning tool searches algorithms to find the best model for your data. The pre-configured image on Microsoft Azure simplifies deployment and offers consistent performance across different compute resources. Key features: efficiency, hyperparameter optimization, ensemble learning, open-source accessibility, and high performance. Apps4Rent provides support and expertise for deploying Auto-sklearn on Azure.
BitFractal Transcriber Speech to Text (STT) API: This offer from BitFractal transcribes audio clips into captions and transcriptions for various industries, supporting more than 140 languages and dialects. It offers accurate transcriptions with VTT output, profanity filter, and customizable parameters. Available in data centers in the United States, Europe, and Brazil, it can be used with Microsoft Power Automate, Microsoft Azure Logic Apps, Zapier, and other orchestrators.
Bluebox CDMS for Quality Management: This solution from Bluebox offers automatic creation, storage, review, and archival of documents. The CDMS has simple user access features, standard and consistent metadata classification, automated workflows, periodic review processes, task management, document acknowledgments tracking, and a powerful search engine.
Civic Application for Cannabis Regulation: Navigate regulatory nuances with a cannabis regulation software solution that scales and grows. This technology from Accela simplifies cannabis regulation and licensing management, allowing for a coordinated approach between states, local government, and businesses. It automates workflows, offers flexible license types, and ensures compliance, making regulatory agencies more efficient and responsive.
Civic Application for Fire Prevention: Accela’s Fire Prevention solution streamlines inspections, plan review, and permit processing for fire departments. It comes in three levels and can be run in the cloud or on-premises. The solution aligns your fire department’s regulatory activities so you can track progress toward goals, streamline inspections, and improve visibility for property owners.
FreeIPA on Red Hat Enterprise Linux 9: This offer from Cloud Infrastructure Services is an integrated security information management solution for Linux/UNIX-networked environments. It provides centralized authentication, authorization, and account information, and consists of a web interface and command-line administration tools. The solution combines Linux, 389 Directory Server, MIT Kerberos, NTP, DNS, Dogtag Certificate System, SSSD, and others.
GitBucket: This offer from ATH Infosystems is a lightweight, open-source Git platform with an intuitive web-based interface for small- to medium-sized teams. It supports Git repository hosting, issue tracking, pull requests, and code review workflows with user authentication and authorization. Configuration steps involve modifying the GitBucket service configuration file and accessing it through a web browser.
Nextcloud Server on Debian 10 Minimal: This solution offers end-to-end encryption, granular access controls, and compliance with industry standards. It streamlines collaboration by enabling real-time access to files and documents from any device or location. Art Group packages images according to industry standards, ensuring they are always up to date, reliable, and secure.
Nextcloud Server on Debian 11 Minimal: This solution is a secure and scalable solution for businesses, educational institutions, and individual users seeking efficient collaboration and secure data management. It offers an intuitive interface, customization options, and robust security features. Art Group packages images according to industry standards and ensures they are always up to date, reliable, and secure.
Nextcloud Server on Ubuntu 18.04 Minimal: Nextcloud Server is an open-source, self-hosted file sync and sharing program that offers a private, safe alternative to well-known cloud storage providers. It allows users to sync and share files across multiple devices and platforms, offers robust access control and security features, and provides online collaboration tools. Art Group monitors the libraries and components for application updates and vulnerabilities.
Node.js (NVM): Home & Office Improvements presents a comprehensive Ubuntu 22.04 LTS virtual machine for web development, featuring Node.js and Express.js. The VM is optimized for efficiency and security, includes essential tools, and offers step-by-step guidance. It supports the integration of MongoDB, React, Angular, and Docker, and provides extensive documentation and collaborative features for teams. Customization and support are also available.
Omeka: ATH Infosystems offers Omeka, a web publishing platform for creating and managing digital collections of cultural heritage materials with an intuitive dashboard, multi-user collaboration, and interoperability with other systems.
Openfire Team Chat Server on Debian 10 Minimal: This messaging solution streamlines communication and collaboration within organizations. It offers a centralized hub for team communication, real-time messaging, group chat rooms, private messaging, and presence detection. The platform is secure, scalable, and customizable. Art Group packages images according to industry standards, ensuring they’re up to date, reliable, and secure.
Openfire Team Chat Server on Debian 11 Minimal: This secure and scalable platform for instant messaging and group chat offers secure communication, scalability, customization, and centralized administration. It is suitable for businesses, educational institutions, and community groups seeking to improve collaboration. Art Group packages images according to industry standards, ensuring they’re up to date, reliable, and secure.
Quin: Quin, powered by Microsoft Azure OpenAI, streamlines data analysis by integrating Azure services such as natural language prompts, cloud storage, visualization tools, and data extraction. It automates report generation, reduces time required for deriving insights, and boosts overall productivity. Discover the transformative capabilities of Quin, and witness how it can tackle your organization’s unique data analysis challenges.
SilverStripe: ATH Infosystems offers SilverStripe, an open-source CMS and framework for building websites and web applications with features such as modular development, form builder, version control, and SEO optimization tools. It provides a flexible platform for managing content, creating custom web applications, and implementing responsive designs.
Squid Easy Proxy Server on AlmaLinux 9: This offer from Tidal Media is a versatile solution for network infrastructure, offering enhanced security and efficient bandwidth utilization. With features such as access control, content filtering, and caching mechanisms, it simplifies internet traffic management for IT administrators, network engineers, and system architects. The solution is scalable and easy to deploy.
Squid Easy Proxy Server on Oracle Linux 9: This versatile solution from Tidal Media offers a wide range of features and capabilities. It caches frequently accessed web content, reduces bandwidth consumption, and accelerates content delivery. The user-friendly interface allows for easy configuration of rules, access controls, and authentication schemes. It also provides a robust proxy solution with granular access controls and the ability to monitor and log traffic.
Squid Easy Proxy Server on Rocky Linux 8: From Tidal Media, Squid Easy Proxy Server on Rocky Linux 8 is a software solution that simplifies proxy server administration. It offers caching, traffic monitoring, content adaptation, and reverse proxying features to optimize web performance and enhance user experience. Squid serves as a front-end for web servers and load balancers, reducing page load times, mitigating latency issues, improving security, and conserving bandwidth.
Squid Easy Proxy Server on SUSE Linux Enterprise Server 12 SP5: This offer from Tidal Media simplifies web caching and proxying for organizations, improving network performance and internet access control. It streamlines setup and management, accelerates browsing speeds, reduces latency, optimizes bandwidth utilization, and bolsters network security with access control lists, authentication mechanisms, content filtering, and traffic shaping.
Squid Easy Proxy Server on SUSE Linux Enterprise Server 15 SP5: This offer from Tidal Media is a powerful tool for network administrators and IT professionals to enhance network security, optimize internet access, and streamline web traffic management. It offers efficient web traffic management, accelerated access to frequently visited sites through caching, advanced content filtering, and flexible deployment options suitable for businesses of all sizes.
Thunderbird: Thunderbird is an open-source email client renowned for its seamless blend of simplicity and robust functionality while catering to both individual users and professional environments. With this offer from ATH Infosystems, Thunderbird users can effortlessly manage their email accounts while fostering effective communication and collaboration with colleagues and clients.
Zulip: ATH Infosystems offers Zulip, an open-source team chat platform designed for streamlined and productive communication within teams and organizations. It provides threaded and searchable conversations, making it easy to organize discussions by topic and follow specific threads.
Go further with workshops, proofs of concept, and implementations
Otegaru Generation AI Pack: This offer from Hitachi Systems is a Japanese-only service that provides a proof-of-concept environment for using Microsoft Azure OpenAI Service to generate AI at a low cost and with a short turnaround time. It can be used for summarizing complex documents, analyzing customer feedback, creating seminar materials, and more.
Agile Analytics & Reporting: This service helps businesses design and maintain effective visuals using Microsoft Power BI and other Azure solutions. Baufest offers agile design, strong business focus, DevOps integration, and adaptable options for new or existing visuals. Services include KPI/metric definition, dashboard/report design, data mapping, visualization implementation, access configuration, demos/training, deployment, and support.
Azure DevOps Implementation: Baufest’s DevOps team helps companies implement a customized DevOps strategy that optimizes operations, improves collaboration, and increases efficiency. It evaluates current workflows and technology landscapes, develops a roadmap, and facilitates a smooth transition to a DevOps culture and practices. This approach includes process improvement, skills development, and continuous optimization.
CloudLeap – On-Premises 2 Azure: 5-Week Implementation: Microsoft Azure offers a structured and tailored approach to seamlessly migrate from on-premises to the cloud. The process involves discovery, assessment, planning, replication, test failover, failover, security, and management. Key benefits of this offer from Systems Ltd include cost optimization, scalability, disaster recovery, compliance, and hybrid migration.
Demystifying AI for Small Businesses: 8-Hour Workshop: This Noventiq workshop focuses on Microsoft Azure AI services and real-life use cases. The workshop is tailored for small business owners and managers with minimal AI technical exposure, offering solutions through automation, data-driven insights, and growth strategies. The workshop covers AI basics, diverse applications, efficiency gains, human-machine synergy, and responsible AI practices.
Utilities Co-Pilot: This offer from E& Enterprise is an AI-powered virtual assistant that streamlines utility management, enhances operations, and empowers key departments. It offers advanced tools, actionable insights, real-time updates, improved visibility and response time, and streamlined business processes. It also provides personalized experiences, usage alerts, energy-saving tips, and billing control.
Contact our partners
Solo Infra Modernization: 6-Week Briefing
Azure Readiness: 3-Week Assessment
Accela Civic Application for Environmental Health
Apache HTTP Server on CentOS Linux 7
Apache HTTP Server on Ubuntu Server 20.04 LTS
Apache Subversion (SVN) on Ubuntu Server 22.04 LTS
Azure Cost Optimization Managed Services
Civic Application for Alcoholic Beverage Control
Civic Application for Building
Civic Application for Business Licensing
Civic Application for Planning
Debian 11 Minimal with iPerf3 Server
Discovery Phase: 8-Week Assessment
ETL and Reverse ETL Connectors for Azure SQL
ETL and Reverse ETL Connectors for Azure Synapse
Fellowmind Managed Platform for XDR
Flask (Python) on Ubuntu 22.04 LTS
Forescout for OT Security Core
Gitea Git Server on Ubuntu 20.04 Minimal
Gitea Git Server on Ubuntu 22.04
Gitea Git Server on Ubuntu 22.04 Minimal
Gogs Git Service on Ubuntu 20.04 LTS Minimal
Gogs Git Service on Ubuntu 22.04 LTS
Gogs Git Service on Ubuntu 22.04 LTS Minimal
LibrePhotos Server on Ubuntu 20.04 Minimal
Microsoft Fabric: 2-Hour Workshop
Moon HRM: HR Management and Payroll Software
NIST CSF Assessment and Planning
Oracle Linux 8.7 Minimal with iPerf3 Server
Oracle Linux 8.7 with Wireguard Server
Packer Server on Debian 10 Minimal
Packer Server on Debian 11 Minimal
Packer Server on Ubuntu 18.04 Minimal
Packer Server on Ubuntu 20.04 Minimal
Packer Server on Ubuntu 22.04 Minimal
Patient Safety Narrative Creation
Red Hat Enterprise Linux 8.6 Minimal with NginX
Redstor Cloud Backup for Azure Kubernetes Service
STI AI: Check for STIs by Chatting with Our AI
Tenant Pre-Migration Assistant
Trac System with Authentication on Debian 11
Trac System with Authentication on Debian 12
Trac System with Authentication on Oracle Linux 8
Trac System with Authentication on Oracle Linux 9
Trac System with Authentication on Red Hat Enterprise Linux 7
Trac System with Authentication on Red Hat Enterprise Linux 8
Trac System with Authentication on Red Hat Enterprise Linux 9
Trac System with Authentication on Ubuntu 20.04
Trac System with Authentication on Ubuntu 22.04
Ubuntu 20.04 Minimal with iPerf3 Server
Ubuntu Server 24.04 LTS – Gen 2
ZeroFox Alerts and CTI Connectors
This content was generated by Microsoft Azure OpenAI and then revised by human editors.
Microsoft Tech Community – Latest Blogs –Read More
Organizing rule collections and rule collection groups in Azure Firewall Policy
Firewall Policy is the recommended method to manage Azure Firewall security and operational configurations. When using Firewall Policy, any rules must be part of a rule collection and rule collection group. Rule collections are sets of rules that share the same priority and action, and can be of type DNAT, Network, or Application. Rule collection groups are containers for rule collections of any type and are processed first by Azure Firewall based on priority. To learn more about rules, rule collections, and rule collections groups, see Azure Firewall Policy rule sets.
This article provides some best practices for configuring and organizing Firewall Policy rules into rule collections and rule collections groups.
Rule processing logic
The first thing to note is that if threat intelligence-based filtering is enabled, those rules are evaluated first and may deny traffic before any configured rules are processed.
For configured rules, the following logic applies:
All DNAT rules are processed first, followed by Network rules, and lastly, by Application rules.
For each rule type stated in 1., the firewall evaluates rules based on priority. It will look at the rule collection group with the highest priority, and within that rule collection group, at the rule collection with the highest priority. Keep in mind that priority is any number between 100 (highest priority) and 65,000 (lowest priority).
If there are rules inherited from a parent policy, these will take precedence over rules configured in the child policy. Thus, the logic described in step 2. will apply to inherited rules first.
For detailed examples of this rule processing logic, see Rule processing using Firewall Policy.
How to structure your rule collections and rule collection groups?
While there is no one-size-fits-all approach, as it depends on an organization’s specific requirements, here are some general recommendations:
Create a rule collection group per workload or per Line of Business (LOB), depending on the size of the organization.
Allows for the separation of concerns, by grouping multiple rule collections, potentially of different types, into a single rule collection group.
Improves readability and management.
Particularly useful when adopting Infrastructure-as-Code (IaC). Rule collection groups are independent objects in Bicep, Terraform, or ARM templates, so you can have separate templates, one for each rule collection group, and assign different owners. Moreover, it minimizes the blast radius of changes.
Note: The maximum number of rule collection groups per firewall policy is 90, for policies created after July 2022, and 50 for policies created before July 2022. If you expect the number of workloads to surpass these values, create a rule collection group per LOB and leverage rule collections to segregate workloads. For more information on Azure Firewall limits, see Azure Firewall limits.
Prioritize rule collections and rule collection groups based on their use frequency. Keep in mind that priority is any number between 100 (highest priority) and 65,000 (lowest priority).
Assign a higher priority to rule collections and rule collections groups that are expected to have more hits, and a lower priority to those that are more generic, less critical, or with a lower use frequency.
DNAT rules must have a higher priority than Network rules, and Network rules must have a higher priority than Application rules.
This approach optimizes rule processing, which in turn, contributes to maintaining the firewall’s optimal performance.
Can be monitored and fine-tuned as needed with the help of Azure Firewall Policy Analytics.
Use an intuitive and consistent naming convention.
Use IP groups or IP prefixes when configuring rules whenever possible.
Optimizes rule configuration and processing.
Simplifies management.
Use the allow action for rule collections and rule collection groups that explicitly allow traffic that is required, and the deny action for rule collections and rule collection groups that explicitly block traffic not required. An example of this could be allowing internet access from your VNets, except for specific Web categories. Keep in mind that Azure Firewall denies traffic by default, so a ‘Deny All’ rule is generally not useful.
Reference implementations
In the following section, we will describe some potential ways to arrange rule collections and rule collection groups when setting up your firewall policy.
1. Single policy with rule collection group per workload
In this scenario, each workload has its own rule collection group encompassing all rules related to it. There is also a separate rule collection group for platform rules, i.e., rules that support the platform as a whole, regardless of workload. The tables below represent how this approach could look like.
Using as an example a fictional, publicly facing, application named ContosoWeb:
Name
Type
Action
Priority
Function
contosoWeb-rcg01
Rule collection group
–
500
Encompasses every rule related to this workload, typically deployed in its own VNet, peered to a hub VNet, or Virtual WAN hub, where the firewall is deployed.
contosoWeb-dnat-rc01
DNAT rule collection
Allow
501
Allows access from the Internet to this application via DNAT rule1.
contosoWeb-net-rc01
Network rule collection
Allow
502
Allows access from admins or developers in selected networks (Azure or on-premises).
contosoWeb-app-rc01
Application rule collection
Allow
503
Allows access from ContosoWeb resources to required FQDNs.
1Azure Application Gateway (regional service) or Azure Front Door (global service) are the recommended products to securely expose HTTP(S) applications on the internet. Azure Firewall is primarily recommended for non-HTTP(s) applications. To see more information on how to leverage both Azure Firewall and Azure Application Gateway to secure workloads, see Firewall and Application Gateway for virtual networks.
Using as an example a second fictional application, but privately facing, named ContosoOps:
Name
Type
Action
Priority
Function
contosoOps-rcg01
Rule collection group
–
600
Encompasses every rule related to this workload, typically deployed in its own VNet, peered to a hub VNet, or Virtual WAN hub, where the firewall is deployed.
contosoOps-net-rc01
Network rule collection
Allow
601
Allows access to this workload from selected Azure VNets, branches, remote users, and/or vice versa. Allows access to specific Azure services leveraging service tags2.
contosoOps-net-rc02
Network rule collection
Deny
602
Blocks internet access from resources pertaining to this workload.
2 If not using private endpoints to securely access PaaS services, it is recommended to enable virtual network service endpoints for those services in the Azure Firewall subnet (not applicable when deploying Azure Firewall in Virtual WAN hub), and disable them in the connected spoke virtual networks. To learn more about service tags and virtual network service endpoints, see Virtual network service tags.
If applicable, each workload can have a rule collection group dedicated to its test or sandbox environment. This ensures that any changes to the test environment do not affect production rules, thus preventing unwanted changes.
Name
Type
Action
Priority
Function
contosoOps-test-rcg02
Rule collection group
–
700
Includes all rules related to the test environment of contosoOps.
contosoOps-test-net-rc01
Network rule collection
Allow
701
Allows access from developers in selected networks (Azure or on-premises) to contosoOps test environment.
Name
Type
Action
Priority
Function
platform-all-wrkls-rcg01
Rule collection group
–
800
Workload-agnostic rules, enforced by a general network admin, that support the platform and follow org-wide security standards.
all-wrkls-net-rc01
Network rule collection
Allow
801
Allow all workloads access to shared services – domain controllers, for example – or cloud services leveraging service tags2.
all-wrkls-app-rc01
Application rule collection
Allow
802
Application rules to allow all workloads access to Microsoft services – for instance, Windows Update traffic – leveraging FQDN tags.
all-wrkls-app-rc02
Application rule collection
Deny
803
Enforce internet browsing restrictions from Azure networks, leveraging Web Categories, for example.
This is a graphical representation of this reference implementation:
2. Policy with rule collection group per Line of Business (LOB) and inherited rules from parent policy
In this scenario, a parent policy is used to enforce platform rules on potentially several firewall instances, in different regions. Applications are grouped into Lines of Business (LOBs), each having a dedicated rule collection group. Rule collections are used to distinguish between applications belonging to the same LOB. Firewall administrators in each region handle the configuration of their child policy.
Using the previous example as a basis, this approach would result in the following rule collection and rule collection group structure:
Name
Type
Action
Priority
Function
contosoApps-rcg01
Rule collection group
–
500
Encompasses every rule related to ContosoApps LOB.
contosoWeb-dnat-rc01
DNAT rule collection
Allow
501
Allows access from the Internet to ContosoWeb via DNAT rule1.
contosoWeb-net-rc01
Network rule collection
Allow
502
Allows access from admins or developers in selected networks (Azure or on-premises).
contosoOps-net-rc01
Network rule collection
Allow
503
Allows access to ContosoOps from selected Azure VNets, branches, remote users, and/or vice versa. Allows access to specific Azure services leveraging service tags2.
contosoOps-net-rc02
Network rule collection
Deny
504
Blocks internet access from resources pertaining to ContosoOps.
contosoOps-test-net-rc01
Network rule collection
Allow
505
Allows access from developers in selected networks (Azure or on-premises) to contosoOps test environment.
contosoWeb-app-rc01
Application rule collection
Allow
506
Allows access from ContosoWeb resources to required FQDNs.
The same logic can be used for other LOBs. Notice that contosoWeb-app-rc01 rule collection has a lower priority than the network rule collections of contosoOps, even though it had a higher priority in the previous example. contosoOps-test-net-rc01 also gets a lower priority number (meaning higher priority) than in the previous example.
This meets the requirement to make sure that, within the same rule collection group, DNAT rules have a higher priority than Network rules, and that Network rules have a higher priority than Application rules.
The rule collection group dedicated to platform rules remains practically the same in this example, except for org-wide restrictions such as all-wrkls-app-rc02, enforced by a parent policy instead. The names of the rule collections and rule collection groups are also slightly different to distinguish between regional and global rules.
Name
Type
Action
Priority
Function
<region>-platform-all-wrkls-rcg01
Rule collection group
–
800
Workload-agnostic rules, enforced by a regional network or firewall admin.
<region>-all-wrkls-net-rc01
Network rule collection
Allow
801
Allows all workloads access to shared services – domain controllers, for example – or cloud services leveraging service tags2.
<region>-all-wrkls-app-rc01
Application rule collection
Allow
802
Application rules to allow all workloads access to Microsoft services – for instance, Windows Update traffic – leveraging FQDN tags.
Moreover, this policy would inherit the following rule collection group from its parent policy:
Name
Type
Action
Priority
Function
global-platform-all-wrkls-rcg01
Rule collection group
–
1000
Workload-agnostic rules, enforced by a global network or firewall admin and that enforce org-wide security standards.
global-all-wrkls-app-rc01
Application rule collection
Deny
1001
Enforces internet browsing restrictions from Azure networks, leveraging Web Categories, for example.
Here’s the graphical representation of this reference implementation:
Lastly, the following table illustrates how the order of evaluation by the firewall is impacted by each approach:
1. Single policy with RCG per workload
2. Policy with RCG per LOB & inherited rules
contosoWeb-dnat-rc01
contosoWeb-dnat-rc01
contosoWeb-net-rc01
contosoWeb-net-rc01
contosoOps-net-rc01
contosoOps-net-rc01
contosoOps-net-rc02
contosoOps-net-rc02
contosoOps-test-net-rc01
contosoOps-test-net-rc01
all-wrkls-net-rc01
<region>-all-wrkls-net-rc01
contosoWeb-app-rc01
<global>-all-wrkls-app-rc01
all-wrkls-app-rc01
contosoWeb-app-rc01
all-wrkls-app-rc02
<region>-all-wrkls-app-rc01
<global>-all-wrkls-app-rc01 (all-wrkls-app-rc02 in example 1.) is evaluated before any other application rules in example 2. because it is inherited from a parent policy. Rule collection groups from a parent policy always take precedence, regardless of the priority of the child policy.
Microsoft Tech Community – Latest Blogs –Read More
Plotting S parameters in Matlab
Hi. So I’m trying to plot S parameters of a system. I need to plot S11 and S21 and have equations for both (derived from network synthesis data). Now my question is:
1) should I use
sparameters(S11,f)
command if the equation for S11 that I have in the code already defines it as S parameter?
S11(1,x)=1+2*i*Rs*inv(A(1,1));
A changes with frequency, and my code is designed such that every value of A(1,1) yeilds a different S11 parameter and that is stored in location (1,x) with x increasing with each cycle (x=x+1).
2) I’m not getting the right curve with or without using the sparameters command. Also rfplot and plot yield the same incorrect curve. Should S11 be in dB?Hi. So I’m trying to plot S parameters of a system. I need to plot S11 and S21 and have equations for both (derived from network synthesis data). Now my question is:
1) should I use
sparameters(S11,f)
command if the equation for S11 that I have in the code already defines it as S parameter?
S11(1,x)=1+2*i*Rs*inv(A(1,1));
A changes with frequency, and my code is designed such that every value of A(1,1) yeilds a different S11 parameter and that is stored in location (1,x) with x increasing with each cycle (x=x+1).
2) I’m not getting the right curve with or without using the sparameters command. Also rfplot and plot yield the same incorrect curve. Should S11 be in dB? Hi. So I’m trying to plot S parameters of a system. I need to plot S11 and S21 and have equations for both (derived from network synthesis data). Now my question is:
1) should I use
sparameters(S11,f)
command if the equation for S11 that I have in the code already defines it as S parameter?
S11(1,x)=1+2*i*Rs*inv(A(1,1));
A changes with frequency, and my code is designed such that every value of A(1,1) yeilds a different S11 parameter and that is stored in location (1,x) with x increasing with each cycle (x=x+1).
2) I’m not getting the right curve with or without using the sparameters command. Also rfplot and plot yield the same incorrect curve. Should S11 be in dB? s parameters, s11, s-parameter MATLAB Answers — New Questions
Cannot find the pointers in my Simulink model, need to remove them for code generation
Hello all,
I am relatively new in the ways of code generation in Simulink and I’ve run into a problem.
When I try to convert a subsystem to PLC code (CoDeSyS 3.5), Simulink throws the following error:
Error:The model requires pointer type representation. This is not supported by Simulink PLC Coder.
### PLC code generation failed for ‘UnderStruct_Mod_V1/Understructure’
I barely understand what a ‘pointer type representation’ is and I’m sure I’ve not included the need for pointers on purpose. I have exhausted my google-skills on this problem and honestly have no idea where to look anymore. Could someone please point me in the right direction? Is there a box that I should check or uncheck? Are there some elements in my model that force the use of pointers?
Much appreciatedHello all,
I am relatively new in the ways of code generation in Simulink and I’ve run into a problem.
When I try to convert a subsystem to PLC code (CoDeSyS 3.5), Simulink throws the following error:
Error:The model requires pointer type representation. This is not supported by Simulink PLC Coder.
### PLC code generation failed for ‘UnderStruct_Mod_V1/Understructure’
I barely understand what a ‘pointer type representation’ is and I’m sure I’ve not included the need for pointers on purpose. I have exhausted my google-skills on this problem and honestly have no idea where to look anymore. Could someone please point me in the right direction? Is there a box that I should check or uncheck? Are there some elements in my model that force the use of pointers?
Much appreciated Hello all,
I am relatively new in the ways of code generation in Simulink and I’ve run into a problem.
When I try to convert a subsystem to PLC code (CoDeSyS 3.5), Simulink throws the following error:
Error:The model requires pointer type representation. This is not supported by Simulink PLC Coder.
### PLC code generation failed for ‘UnderStruct_Mod_V1/Understructure’
I barely understand what a ‘pointer type representation’ is and I’m sure I’ve not included the need for pointers on purpose. I have exhausted my google-skills on this problem and honestly have no idea where to look anymore. Could someone please point me in the right direction? Is there a box that I should check or uncheck? Are there some elements in my model that force the use of pointers?
Much appreciated plc code generator MATLAB Answers — New Questions
How to connect with QGroundControl via Telemetry Radios in PX4 support package?
We want to connect with QGroundControl via Telemetry Radios but we get the following error:
Error on link Serial Device on COM6. Error connecting: Could not create port. Access is denied
In my web searches related to the error, I came across the following link: https://www.mathworks.com/matlabcentral/answers/471513-solved-how-to-send-serial-data-over-telemetry-radio-px4-autopilots-support-from-embedded-coder
It talks about using a companion computer like Raspberry Pi to make it happen. It seems here the support package does not support communication by telemetry.
Is there a way to communicate with telemetry radios without using a Companion computer?We want to connect with QGroundControl via Telemetry Radios but we get the following error:
Error on link Serial Device on COM6. Error connecting: Could not create port. Access is denied
In my web searches related to the error, I came across the following link: https://www.mathworks.com/matlabcentral/answers/471513-solved-how-to-send-serial-data-over-telemetry-radio-px4-autopilots-support-from-embedded-coder
It talks about using a companion computer like Raspberry Pi to make it happen. It seems here the support package does not support communication by telemetry.
Is there a way to communicate with telemetry radios without using a Companion computer? We want to connect with QGroundControl via Telemetry Radios but we get the following error:
Error on link Serial Device on COM6. Error connecting: Could not create port. Access is denied
In my web searches related to the error, I came across the following link: https://www.mathworks.com/matlabcentral/answers/471513-solved-how-to-send-serial-data-over-telemetry-radio-px4-autopilots-support-from-embedded-coder
It talks about using a companion computer like Raspberry Pi to make it happen. It seems here the support package does not support communication by telemetry.
Is there a way to communicate with telemetry radios without using a Companion computer? MATLAB Answers — New Questions
Reusable functions (embedded coder) and model reference
I have a model A which contains two other models B and C through the model referencing. All this models use a block defined in a custom library.
I have set "Function packaging: Reusable function" for the library block. By this way each model (A, B or C) reuse code for the block. However in the generated C code, for each model I have a different function (with different signature but the same implementation).
I would create reusable code for the library block. That is I want only one implementation for the function called by all the models A, B and C.
I tried to set function name and File name for the library block but I get an error
"Potential conflicting usages of identifier ‘rtZCSV_GainLib’: a global identifier from model B, and a global identifier from model C
The conflict may be resolved by increasing the maximum identifier length on the Symbols pane of the Configuration Parameters dialog box. Otherwise the conflicting identifiers need to be renamed."
Is it possible generate only one implementation for the library block in a given c files and configure all the models A, B, C in a way that they call the same function? What are the settings I have to use?
Thanks,
PaoloI have a model A which contains two other models B and C through the model referencing. All this models use a block defined in a custom library.
I have set "Function packaging: Reusable function" for the library block. By this way each model (A, B or C) reuse code for the block. However in the generated C code, for each model I have a different function (with different signature but the same implementation).
I would create reusable code for the library block. That is I want only one implementation for the function called by all the models A, B and C.
I tried to set function name and File name for the library block but I get an error
"Potential conflicting usages of identifier ‘rtZCSV_GainLib’: a global identifier from model B, and a global identifier from model C
The conflict may be resolved by increasing the maximum identifier length on the Symbols pane of the Configuration Parameters dialog box. Otherwise the conflicting identifiers need to be renamed."
Is it possible generate only one implementation for the library block in a given c files and configure all the models A, B, C in a way that they call the same function? What are the settings I have to use?
Thanks,
Paolo I have a model A which contains two other models B and C through the model referencing. All this models use a block defined in a custom library.
I have set "Function packaging: Reusable function" for the library block. By this way each model (A, B or C) reuse code for the block. However in the generated C code, for each model I have a different function (with different signature but the same implementation).
I would create reusable code for the library block. That is I want only one implementation for the function called by all the models A, B and C.
I tried to set function name and File name for the library block but I get an error
"Potential conflicting usages of identifier ‘rtZCSV_GainLib’: a global identifier from model B, and a global identifier from model C
The conflict may be resolved by increasing the maximum identifier length on the Symbols pane of the Configuration Parameters dialog box. Otherwise the conflicting identifiers need to be renamed."
Is it possible generate only one implementation for the library block in a given c files and configure all the models A, B, C in a way that they call the same function? What are the settings I have to use?
Thanks,
Paolo embedded coder simulink function library reuse code model reference MATLAB Answers — New Questions
How do I export my app to a pdf without clipping?
I want to export my app to a pdf report. I am using the code below (straight from the example for "exportapp":
% Button pushed function: ExportDataButton
function ExportDataButtonPushed(app, event)
filter = {‘*.jpg’;’*.png’;’*.tif’;’*.pdf’};
[filename,filepath] = uiputfile(filter);
if ischar(filename)
exportapp(app.VisionMetricsUIFigure,[filepath filename]);
end
end
When I choose a file name as an image, everything displays as expected. When I create a pdf, it clips off the right/bottom of the app.
I initially thought it might be related to the app size, so I tried to shrink it to the area that was displayed, but it still clipped in the same area.
Original Size: 952×761
New Size: 876×638
How can I get everything to display when saved as a pdf?I want to export my app to a pdf report. I am using the code below (straight from the example for "exportapp":
% Button pushed function: ExportDataButton
function ExportDataButtonPushed(app, event)
filter = {‘*.jpg’;’*.png’;’*.tif’;’*.pdf’};
[filename,filepath] = uiputfile(filter);
if ischar(filename)
exportapp(app.VisionMetricsUIFigure,[filepath filename]);
end
end
When I choose a file name as an image, everything displays as expected. When I create a pdf, it clips off the right/bottom of the app.
I initially thought it might be related to the app size, so I tried to shrink it to the area that was displayed, but it still clipped in the same area.
Original Size: 952×761
New Size: 876×638
How can I get everything to display when saved as a pdf? I want to export my app to a pdf report. I am using the code below (straight from the example for "exportapp":
% Button pushed function: ExportDataButton
function ExportDataButtonPushed(app, event)
filter = {‘*.jpg’;’*.png’;’*.tif’;’*.pdf’};
[filename,filepath] = uiputfile(filter);
if ischar(filename)
exportapp(app.VisionMetricsUIFigure,[filepath filename]);
end
end
When I choose a file name as an image, everything displays as expected. When I create a pdf, it clips off the right/bottom of the app.
I initially thought it might be related to the app size, so I tried to shrink it to the area that was displayed, but it still clipped in the same area.
Original Size: 952×761
New Size: 876×638
How can I get everything to display when saved as a pdf? app designer, pdf MATLAB Answers — New Questions
How to fix loop which over the determined index ?
Hi guys, im trying to do looping ii 1:900 but why when u run it, it was never-ending loop. After reach 900, it will continue to 901 but using model with i = 1 (start again from beginning).
Here are my code:
%% clean-up the workspace & command window
clc;
clear;
clc;
tic;
%% Preparation to connect with OAPI SAP2000
%set the following flag to true to attach to an existing instance of the program otherwise a new instance of the program will be started
AttachToInstance = true();
% set the following flag to true to manually specify the path to ETABS.exe
% this allows for a connection to a version of ETABS other than the latest installation
% otherwise the latest installed version of ETABS will be launched
SpecifyPath = true();
% if the above flag is set to true, specify the path to ETABS below
ProgramPath = ‘C:Program FilesComputers and StructuresSAP2000 25SAP2000.exe’;
% full path to API dll set it to the installation folder
APIDLLPath = ‘C:Program FilesComputers and StructuresSAP2000 25SAP2000v1.dll’;
% create API helper objectETABSv1ETAB
a = NET.addAssembly(APIDLLPath);
helper = SAP2000v1.Helper;
helper = NET.explicitCast(helper,’SAP2000v1.cHelper’);
if AttachToInstance
% attach to a running instance of ETABS
SapObject = helper.GetObject(‘CSI.SAP2000.API.SapObject’);
SapObject = NET.explicitCast(SapObject,’SAP2000v1.cOAPI’);
else
if SpecifyPath
% create an instance of the ETABS object from the specified path
SapObject = helper.CreateObject(ProgramPath);
else
% create an instance of the ETABS object from the latest installed ETABS
SapObject = helper.CreateObjectProgID(‘CSI.SAP2000.API.SapObject’);
end
SapObject = NET.explicitCast(SapObject,’SAP2000v1.cOAPI’);
% start ETABS application
SapObject.ApplicationStart;
end
helper = 0;
% create SapModel object
SapModel = NET.explicitCast(SapObject.SapModel,’SAP2000v1.cSapModel’);
%% Define Variant Model
VariantModel = compose(‘%d’,2:2);
VariantENDT= compose(‘A%d’,1:5);
VariantTOS1= compose(‘B%d’,1:1);
VariantTOS2 = compose(‘C%d’,1:1);
VariantTOS3 = compose(‘D%d’,1:1);
VariantBOS1 = compose(‘E%d’,1:1);
VariantBOS2 = compose(‘F%d’,1:1);
VariantBOS3 = compose(‘G%d’,1:1);
VariantDOS1 = compose(‘H%d’,1:1);
VariantDOS2 = compose(‘I%d’,1:1);
VariantVOS = compose(‘J%d’,1:1);
VariantTSS = compose(‘K%d’,1:6);
VariantBSS = compose(‘L%d’,1:6);
VariantDSS = compose(‘M%d’,1:1);
VariantVSS = compose(‘N%d’,1:1);
VariantCOL = compose(‘O%d’,1:5);
%% Define Variable For Looping Analysis
Specimen = repmat("",length(VariantModel)*length(VariantENDT)*length(VariantTOS1)*length(VariantBOS1)*length(VariantDOS1)*length(VariantVOS)*length(VariantTSS)*length(VariantBSS)*length(VariantDSS)*length(VariantCOL),1);
Optimizevalue = zeros(1,length(Specimen));
checkratio = strings(1,length(Specimen));
CheckHingeCOL = strings(1,length(Specimen));
checkfuse = strings(1,length(Specimen));
R = zeros(1,length(Specimen));
W = zeros(1,length(Specimen));
Cg = zeros(1,length(Specimen));
ii = 0;
for i = 1:length(Specimen)
for iVAR = 1:length(VariantModel)
for iEND = 1:length(VariantENDT)
ENDsection = string(VariantENDT(iEND));
for iTOS = 1:length(VariantTOS1)
TOS1section = string(VariantTOS1(iTOS));
TOS2section = string(VariantTOS2(iTOS));
TOS3section = string(VariantTOS3(iTOS));
for iBOS = 1 : length(VariantBOS1)
BOS1section = string(VariantBOS1(iBOS));
BOS2section = string(VariantBOS2(iBOS));
BOS3section = string(VariantBOS3(iBOS));
for iDOS = 1 : length(VariantDOS1)
DOS1section = string(VariantDOS1(iDOS));
DOS2section = string(VariantDOS2(iDOS));
for iVOS = 1 : length(VariantVOS)
VOSsection = string(VariantVOS(iVOS));
for iTSS = 1 : length(VariantTSS)
TSSsection = string(VariantTSS(iTSS));
for iBSS = 1 : length(VariantBSS)
BSSsection = string(VariantBSS(iBSS));
for iDSSVSS = 1 : length(VariantDSS)
DSSsection = string(VariantDSS(iDSSVSS));
VSSsection = string(VariantVSS(iDSSVSS));
for iCOL = 1 : length(VariantCOL)
COLsection = string(VariantCOL(iCOL));
ii = ii+1;
Specimen(ii) = append(VariantModel(iVAR),VariantENDT(iEND),VariantTOS1(iTOS),VariantTOS2(iTOS),VariantTOS3(iTOS),VariantBOS1(iBOS),VariantBOS2(iBOS),VariantBOS3(iBOS),VariantDOS1(iDOS),VariantDOS2(iDOS),VariantVOS(iVOS),VariantTSS(iTSS),VariantBSS(iBSS),VariantDSS(iDSSVSS),VariantVSS(iDSSVSS),VariantCOL(iCOL));
%% DEFINE OAPI FUNCTION
ret = SapModel.InitializeNewModel(SAP2000v1.eUnits.kN_m_C);
File = NET.explicitCast(SapModel.File,’SAP2000v1.cFile’);
PropFrame = NET.explicitCast(SapModel.PropFrame,’SAP2000v1.cPropFrame’);
Group=NET.explicitCast(SapModel.GroupDef,’SAP2000v1.cGroup’);
FrameObj = NET.explicitCast(SapModel.FrameObj,’SAP2000v1.cFrameObj’);
Analyze = NET.explicitCast(SapModel.Analyze,’SAP2000v1.cAnalyze’);
DesignSteel = NET.explicitCast(SapModel.DesignSteel,’SAP2000v1.cDesignSteel’);
View = NET.explicitCast(SapModel.View,’SAP2000v1.cView’);
DatabaseTables = NET.explicitCast(SapModel.DatabaseTables,’SAP2000v1.cDatabaseTables’);
SelectObj = NET.explicitCast(SapModel.SelectObj,’SAP2000v1.cSelect’);
%% MODELING SAP2000
FileName = ‘D:\REF FAROS\MATLAB\Prelim\Prelimnarysection.s2k’;
ret = File.OpenFile(FileName);
ret = SapModel.SetPresentUnits(SAP2000v1.eUnits.N_mm_C);
% define frame section property for A(EndTruss)
ret = PropFrame.SetTube(‘A1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘A2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘A3′,’BJ-37’,203,203,12.7,12.7);
ret = PropFrame.SetTube(‘A4′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘A5′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for B(TOS1)
ret = PropFrame.SetTube(‘B1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘B2′,’BJ-37’,177,177,6.4,6.4);
ret = PropFrame.SetTube(‘B3′,’BJ-37’,203,203,6.4,6.4);
% define frame section property for C(TOS2)
ret = PropFrame.SetTube(‘C1′,’BJ-37’,152,152,7.9,7.9);
ret = PropFrame.SetTube(‘C2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘C3′,’BJ-37’,203,203,7.9,7.9);
% define frame section property for D(TOS3)
ret = PropFrame.SetTube(‘D1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘D2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘D3′,’BJ-37’,254,254,9.5,9.5);
% define frame section property for E(BOS1)
ret = PropFrame.SetTube(‘E1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘E2′,’BJ-37’,177,177,6.4,6.4);
ret = PropFrame.SetTube(‘B3′,’BJ-37’,203,203,6.4,6.4);
% define frame section property for F(BOS2)
ret = PropFrame.SetTube(‘F1′,’BJ-37’,152,152,7.9,7.9);
ret = PropFrame.SetTube(‘F2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘F3′,’BJ-37’,203,203,7.9,7.9);
% define frame section property for G(BOS3)
ret = PropFrame.SetTube(‘G1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘G2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘G3′,’BJ-37’,254,254,9.5,9.5);
% define frame section property for H(DOS1)
ret = PropFrame.SetTube(‘H1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘H2′,’BJ-37’,203,203,12.7,12.7);
ret = PropFrame.SetTube(‘H3′,’BJ-37’,254,254,12.7,12.7);
% define frame section property for I(DOS2)
ret = PropFrame.SetTube(‘I1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘I2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘I3′,’BJ-37’,203,203,12.7,12.7);
% define frame section property for J(VOS)
ret = PropFrame.SetTube(‘J1′,’BJ-37’,50,50,2.2,2.2);
% define frame section property for K(TSS)
ret = PropFrame.SetTube(‘K1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘K2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘K3′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘K4′,’BJ-37’,254,203,9.5,9.5);
ret = PropFrame.SetTube(‘K5′,’BJ-37’,304,254,12.7,12.7);
ret = PropFrame.SetTube(‘K6′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for L(BSS)
ret = PropFrame.SetTube(‘L1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘L2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘L3′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘L4′,’BJ-37’,254,203,9.5,9.5);
ret = PropFrame.SetTube(‘L5′,’BJ-37’,304,254,12.7,12.7);
ret = PropFrame.SetTube(‘L6′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for M(DSS)
ret = PropFrame.SetTube(‘M1′,’BJ-37’,40,40,2.2,2.2);
% define frame section property for N(VSS)
ret = PropFrame.SetTube(‘N1′,’BJ-37’,30,30,2.2,2.2);
% define frame section property for O(COL)
ret = PropFrame.SetTube(‘O1′,’BJ-37’,406,304,15.9,15.9);
ret = PropFrame.SetTube(‘O2′,’BJ-37’,455,250,15.9,15.9);
ret = PropFrame.SetTube(‘O3′,’BJ-37’,508,250,15.9,15.9);
ret = PropFrame.SetTube(‘O4′,’BJ-37’,508,304,19,19);
ret = PropFrame.SetTube(‘O5′,’BJ-37’,600,304,19,19);
% assign frame section by group
ret = FrameObj.SetSection(‘End Truss’,ENDsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment1’,TOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment2’,TOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment3’,TOS3section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment1’,BOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment2’,BOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment3’,BOS3section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalOrdinarySegment1’,DOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalOrdinarySegment2’,DOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘VerticalOrdinarySegment’,VOSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopSpecialSegment’,TSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomSpecialSegment’,BSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalSpecialSegment’,DSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘VerticalSpecialSegment’,VSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘Column’,COLsection,SAP2000v1.eItemType.Group);
%% running analyze
ret = File.Save(‘D:\REF FAROS\MATLAB\Prelim\Preliminarysection-‘+string(Specimen(ii)));
ret = SapModel.SetPresentUnits(SAP2000v1.eUnits.kN_m_C);
ret = Analyze.RunAnalysis();
%% check design steel section
% Add load combination
RespCombo = NET.explicitCast(SapModel.RespCombo,’SAP2000v1.cCombo’);
ret = RespCombo.Add(‘1.2D+1.6L’,0);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’DEAD’,1.2);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’SUPERDEAD’,1.2);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’LIVE’,1.6);
% DesignSteel
ret = DesignSteel.SetCode(‘AISC 360-10’);
ret = DesignSteel.SetComboStrength(‘1.2D+1.6L’,true);
ret = DesignSteel.SetComboAutoGenerate(false);
ret = DesignSteel.StartDesign();
ret = View.RefreshView(0, false());
%% set load case and combo for display table
LoadCaseList = NET.createArray(‘System.String’,6);
LoadCaseList(1)=’DEAD’;
LoadCaseList(2)=’MODAL’;
LoadCaseList(3)=’SUPERDEAD’;
LoadCaseList(4)=’LIVE’;
LoadCaseList(5)=’Gravity NLS’;
LoadCaseList(6)=’Pushover-UX’;
ret = DatabaseTables.SetLoadCasesSelectedForDisplay({‘MODAL’,’DEAD’,’SUPERDEAD’,’LIVE’,’Gravity NLS’,’Pushover-UX’});
LoadCombList = NET.createArray(‘System.String’,1);
LoadCombList(1)=’1.2D+1.6L’;
ret = DatabaseTables.SetLoadCombinationsSelectedForDisplay({‘1.2D+1.6L’});
ret = DatabaseTables.SetTableOutputOptionsForDisplay(0,0,0,true,1,12,true,1,12,2,2,2,2,2,3,1,1,2);
%% get frame label
NumberFrame = 0;
AllFrameName = {”};
[~,NumberFrame,AllFrameName] = FrameObj.GetNameList(NumberFrame,AllFrameName);
% Column
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("Column");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameCOL = string(ObjectName);
% Endtruss
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("End Truss");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameEND = string(ObjectName);
% Top Ordinary Segment (TOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("TopOrdinarySegment1");
ret = SelectObj.Group("TopOrdinarySegment2");
ret = SelectObj.Group("TopOrdinarySegment3");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameTOS = string(ObjectName);
% Bottom Ordinary Segment (BOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("BottomOrdinarySegment1");
ret = SelectObj.Group("BottomOrdinarySegment2");
ret = SelectObj.Group("BottomOrdinarySegment3");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameBOS = string(ObjectName);
% Diagonal Ordinary Segment (DOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("DiagonalOrdinarySegment1");
ret = SelectObj.Group("DiagonalOrdinarySegment2");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameDOS = string(ObjectName);
% Diagonal Ordinary Segment (VOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("VeticalOrdinarySegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameVOS = string(ObjectName);
% Top Special Segment (TSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("TopSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameTSS = string(ObjectName);
% Bottom Special Segment (BSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("BottomSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameBSS = string(ObjectName);
% Diagonal Special Segment (DSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("DiagonalSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameDSS = string(ObjectName);
% Vertical Special Segment (VSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("VerticalSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameVSS = string(ObjectName);
%% get alltable
NumberTables = 0;
TableKey = {”};
TableName = {”};
ImportType = 0;
IsEmpty = NET.createArray(‘System.Boolean’,NumberTables);
[ret,NumberTables,TableKey,TableName,ImportType,IsEmpty] = DatabaseTables.GetAllTables(NumberTables,TableKey,TableName,ImportType,IsEmpty);
TableKey = string(TableKey)’;
TableName = string(TableName)’;
ImportType = int32(ImportType)’;
IsEmpty = logical(IsEmpty)’;
TableKey = array2table(TableKey,"VariableNames",{‘TableKey’});
TableName = array2table(TableName,"VariableNames",{‘TableName’});
ImportType = array2table(ImportType,"VariableNames",{‘ImportType’});
IsEmpty = array2table(IsEmpty,"VariableNames",{‘IsEmpty’});
%Daftartabel = table(TableKey,TableName,ImportType,IsEmpty);
%Daftartabel = table2array(Daftartabel);
%% period of structure
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Modal Periods And Frequencies",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
Period{ii,:} = array2table(TableData,"VariableNames",FieldKeysIncluded);
%% Steel Design Check
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Steel Design 1 – Summary Data – AISC 360-10",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
steeldesignresult = array2table(TableData,"VariableNames",FieldKeysIncluded);
% check maximum ratio
ratio = steeldesignresult.Ratio(:);
ratio = strrep(ratio,’,’,’.’);
ratio = str2double(ratio);
maximumratio = sort(ratio,’descend’);
maximumratio = maximumratio(1);
ratiolimit = 1.00;
if maximumratio<ratiolimit
checkratio(ii) = ‘Ratio OK’;
else
checkratio(ii) = ‘Ratio exceeds allowable limit’;
end
ratioCOL{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameCOL));
ratioEND{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameEND));
ratioTOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameTOS));
ratioBOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameBOS));
ratioDOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameDOS));
ratioVOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameVOS));
ratioTSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameTSS));
ratioBSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameBSS));
ratioDSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameDSS));
ratioVSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameVSS));
%% pushover result
% base-shear
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Base Reactions",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
basereaction = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter1 = strcmp(basereaction.OutputCase,’Pushover-UX’);
baseshearpushx = basereaction(filter1,{‘StepNum’,’GlobalFX’,’GlobalFZ’});
% display displacement of monitored point
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Joint Displacements",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
jointdisplacement = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter1 = strcmp(jointdisplacement.Joint,’4′);
tableout1 = jointdisplacement(filter1,{‘OutputCase’,’StepNum’,’U1′});
filter2 = strcmp(tableout1.OutputCase,’Pushover-UX’);
point5disp = tableout1(filter2,{‘StepNum’,’U1′});
% pushover table
pushovertable{ii,:} = join(baseshearpushx,point5disp);
plotx = str2double(strrep(pushovertable{ii,1}.U1,’,’,’.’));
ploty = str2double(strrep(pushovertable{ii,1}.GlobalFX,’,’,’.’));
%plot(plotx,ploty);
%xlabel(‘Displacement(m)’);
%ylabel(‘Base Shear(kN)’);
%grid on;
%% display hinge states
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Frame Hinge States",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
hingeresult{ii,:} = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameCOL);
hingeCOL = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameEND);
hingeEND = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameTOS);
%hingeTOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameBOS);
%hingeBOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameDOS);
%hingeDOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameVOS);
%hingeVOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameTSS);
hingeTSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameBSS);
hingeBSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameDSS);
%hingeDSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameVSS);
%hingeVSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%% check fuse first yielding
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.HingeState,{‘B to C’});
firstyieldlist{ii,:} = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
stepfirstyield = firstyieldlist{ii,1}.StepNum(:);
stepfirstyield = str2double(stepfirstyield);
stepfirstyield = sort(stepfirstyield,’ascend’);
stepfirstyield = stepfirstyield(1);
stepfirstyield = int2str(stepfirstyield);
framefirstyield{ii,:} = firstyieldlist{ii,1}.Frame(strcmp(firstyieldlist{ii,1}.StepNum,stepfirstyield));
testfuse = ismember(framefirstyield{ii,1},[frameTSS,frameBSS]);
if testfuse == any(true)
checkfuse(ii) = ‘Fuse Correct’;
else
checkfuse(ii) = ‘Fuse wrong designed’;
end
end
end
end
end
end
end
end
end
end
end
end
toc
runningtime = toc;
%writecell(hingeresult,’hingeresult2173.xls’)
writematrix(Specimen,’specimen2173.xls’,’Sheet’,1)
writematrix(checkratio’,’checkratio2173.xls’,’Sheet’,1)
writematrix(checkfuse’,’checkfuse2173.xls’,’Sheet’,1)
%writecell(arrayfun(framefirstyield),’framefirstyield2173.xls’,’Sheet’,1)
%writematrix(firstyieldlist,’firstyieldlist2173.xls’,’Sheet’,1)
clcHi guys, im trying to do looping ii 1:900 but why when u run it, it was never-ending loop. After reach 900, it will continue to 901 but using model with i = 1 (start again from beginning).
Here are my code:
%% clean-up the workspace & command window
clc;
clear;
clc;
tic;
%% Preparation to connect with OAPI SAP2000
%set the following flag to true to attach to an existing instance of the program otherwise a new instance of the program will be started
AttachToInstance = true();
% set the following flag to true to manually specify the path to ETABS.exe
% this allows for a connection to a version of ETABS other than the latest installation
% otherwise the latest installed version of ETABS will be launched
SpecifyPath = true();
% if the above flag is set to true, specify the path to ETABS below
ProgramPath = ‘C:Program FilesComputers and StructuresSAP2000 25SAP2000.exe’;
% full path to API dll set it to the installation folder
APIDLLPath = ‘C:Program FilesComputers and StructuresSAP2000 25SAP2000v1.dll’;
% create API helper objectETABSv1ETAB
a = NET.addAssembly(APIDLLPath);
helper = SAP2000v1.Helper;
helper = NET.explicitCast(helper,’SAP2000v1.cHelper’);
if AttachToInstance
% attach to a running instance of ETABS
SapObject = helper.GetObject(‘CSI.SAP2000.API.SapObject’);
SapObject = NET.explicitCast(SapObject,’SAP2000v1.cOAPI’);
else
if SpecifyPath
% create an instance of the ETABS object from the specified path
SapObject = helper.CreateObject(ProgramPath);
else
% create an instance of the ETABS object from the latest installed ETABS
SapObject = helper.CreateObjectProgID(‘CSI.SAP2000.API.SapObject’);
end
SapObject = NET.explicitCast(SapObject,’SAP2000v1.cOAPI’);
% start ETABS application
SapObject.ApplicationStart;
end
helper = 0;
% create SapModel object
SapModel = NET.explicitCast(SapObject.SapModel,’SAP2000v1.cSapModel’);
%% Define Variant Model
VariantModel = compose(‘%d’,2:2);
VariantENDT= compose(‘A%d’,1:5);
VariantTOS1= compose(‘B%d’,1:1);
VariantTOS2 = compose(‘C%d’,1:1);
VariantTOS3 = compose(‘D%d’,1:1);
VariantBOS1 = compose(‘E%d’,1:1);
VariantBOS2 = compose(‘F%d’,1:1);
VariantBOS3 = compose(‘G%d’,1:1);
VariantDOS1 = compose(‘H%d’,1:1);
VariantDOS2 = compose(‘I%d’,1:1);
VariantVOS = compose(‘J%d’,1:1);
VariantTSS = compose(‘K%d’,1:6);
VariantBSS = compose(‘L%d’,1:6);
VariantDSS = compose(‘M%d’,1:1);
VariantVSS = compose(‘N%d’,1:1);
VariantCOL = compose(‘O%d’,1:5);
%% Define Variable For Looping Analysis
Specimen = repmat("",length(VariantModel)*length(VariantENDT)*length(VariantTOS1)*length(VariantBOS1)*length(VariantDOS1)*length(VariantVOS)*length(VariantTSS)*length(VariantBSS)*length(VariantDSS)*length(VariantCOL),1);
Optimizevalue = zeros(1,length(Specimen));
checkratio = strings(1,length(Specimen));
CheckHingeCOL = strings(1,length(Specimen));
checkfuse = strings(1,length(Specimen));
R = zeros(1,length(Specimen));
W = zeros(1,length(Specimen));
Cg = zeros(1,length(Specimen));
ii = 0;
for i = 1:length(Specimen)
for iVAR = 1:length(VariantModel)
for iEND = 1:length(VariantENDT)
ENDsection = string(VariantENDT(iEND));
for iTOS = 1:length(VariantTOS1)
TOS1section = string(VariantTOS1(iTOS));
TOS2section = string(VariantTOS2(iTOS));
TOS3section = string(VariantTOS3(iTOS));
for iBOS = 1 : length(VariantBOS1)
BOS1section = string(VariantBOS1(iBOS));
BOS2section = string(VariantBOS2(iBOS));
BOS3section = string(VariantBOS3(iBOS));
for iDOS = 1 : length(VariantDOS1)
DOS1section = string(VariantDOS1(iDOS));
DOS2section = string(VariantDOS2(iDOS));
for iVOS = 1 : length(VariantVOS)
VOSsection = string(VariantVOS(iVOS));
for iTSS = 1 : length(VariantTSS)
TSSsection = string(VariantTSS(iTSS));
for iBSS = 1 : length(VariantBSS)
BSSsection = string(VariantBSS(iBSS));
for iDSSVSS = 1 : length(VariantDSS)
DSSsection = string(VariantDSS(iDSSVSS));
VSSsection = string(VariantVSS(iDSSVSS));
for iCOL = 1 : length(VariantCOL)
COLsection = string(VariantCOL(iCOL));
ii = ii+1;
Specimen(ii) = append(VariantModel(iVAR),VariantENDT(iEND),VariantTOS1(iTOS),VariantTOS2(iTOS),VariantTOS3(iTOS),VariantBOS1(iBOS),VariantBOS2(iBOS),VariantBOS3(iBOS),VariantDOS1(iDOS),VariantDOS2(iDOS),VariantVOS(iVOS),VariantTSS(iTSS),VariantBSS(iBSS),VariantDSS(iDSSVSS),VariantVSS(iDSSVSS),VariantCOL(iCOL));
%% DEFINE OAPI FUNCTION
ret = SapModel.InitializeNewModel(SAP2000v1.eUnits.kN_m_C);
File = NET.explicitCast(SapModel.File,’SAP2000v1.cFile’);
PropFrame = NET.explicitCast(SapModel.PropFrame,’SAP2000v1.cPropFrame’);
Group=NET.explicitCast(SapModel.GroupDef,’SAP2000v1.cGroup’);
FrameObj = NET.explicitCast(SapModel.FrameObj,’SAP2000v1.cFrameObj’);
Analyze = NET.explicitCast(SapModel.Analyze,’SAP2000v1.cAnalyze’);
DesignSteel = NET.explicitCast(SapModel.DesignSteel,’SAP2000v1.cDesignSteel’);
View = NET.explicitCast(SapModel.View,’SAP2000v1.cView’);
DatabaseTables = NET.explicitCast(SapModel.DatabaseTables,’SAP2000v1.cDatabaseTables’);
SelectObj = NET.explicitCast(SapModel.SelectObj,’SAP2000v1.cSelect’);
%% MODELING SAP2000
FileName = ‘D:\REF FAROS\MATLAB\Prelim\Prelimnarysection.s2k’;
ret = File.OpenFile(FileName);
ret = SapModel.SetPresentUnits(SAP2000v1.eUnits.N_mm_C);
% define frame section property for A(EndTruss)
ret = PropFrame.SetTube(‘A1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘A2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘A3′,’BJ-37’,203,203,12.7,12.7);
ret = PropFrame.SetTube(‘A4′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘A5′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for B(TOS1)
ret = PropFrame.SetTube(‘B1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘B2′,’BJ-37’,177,177,6.4,6.4);
ret = PropFrame.SetTube(‘B3′,’BJ-37’,203,203,6.4,6.4);
% define frame section property for C(TOS2)
ret = PropFrame.SetTube(‘C1′,’BJ-37’,152,152,7.9,7.9);
ret = PropFrame.SetTube(‘C2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘C3′,’BJ-37’,203,203,7.9,7.9);
% define frame section property for D(TOS3)
ret = PropFrame.SetTube(‘D1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘D2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘D3′,’BJ-37’,254,254,9.5,9.5);
% define frame section property for E(BOS1)
ret = PropFrame.SetTube(‘E1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘E2′,’BJ-37’,177,177,6.4,6.4);
ret = PropFrame.SetTube(‘B3′,’BJ-37’,203,203,6.4,6.4);
% define frame section property for F(BOS2)
ret = PropFrame.SetTube(‘F1′,’BJ-37’,152,152,7.9,7.9);
ret = PropFrame.SetTube(‘F2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘F3′,’BJ-37’,203,203,7.9,7.9);
% define frame section property for G(BOS3)
ret = PropFrame.SetTube(‘G1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘G2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘G3′,’BJ-37’,254,254,9.5,9.5);
% define frame section property for H(DOS1)
ret = PropFrame.SetTube(‘H1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘H2′,’BJ-37’,203,203,12.7,12.7);
ret = PropFrame.SetTube(‘H3′,’BJ-37’,254,254,12.7,12.7);
% define frame section property for I(DOS2)
ret = PropFrame.SetTube(‘I1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘I2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘I3′,’BJ-37’,203,203,12.7,12.7);
% define frame section property for J(VOS)
ret = PropFrame.SetTube(‘J1′,’BJ-37’,50,50,2.2,2.2);
% define frame section property for K(TSS)
ret = PropFrame.SetTube(‘K1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘K2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘K3′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘K4′,’BJ-37’,254,203,9.5,9.5);
ret = PropFrame.SetTube(‘K5′,’BJ-37’,304,254,12.7,12.7);
ret = PropFrame.SetTube(‘K6′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for L(BSS)
ret = PropFrame.SetTube(‘L1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘L2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘L3′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘L4′,’BJ-37’,254,203,9.5,9.5);
ret = PropFrame.SetTube(‘L5′,’BJ-37’,304,254,12.7,12.7);
ret = PropFrame.SetTube(‘L6′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for M(DSS)
ret = PropFrame.SetTube(‘M1′,’BJ-37’,40,40,2.2,2.2);
% define frame section property for N(VSS)
ret = PropFrame.SetTube(‘N1′,’BJ-37’,30,30,2.2,2.2);
% define frame section property for O(COL)
ret = PropFrame.SetTube(‘O1′,’BJ-37’,406,304,15.9,15.9);
ret = PropFrame.SetTube(‘O2′,’BJ-37’,455,250,15.9,15.9);
ret = PropFrame.SetTube(‘O3′,’BJ-37’,508,250,15.9,15.9);
ret = PropFrame.SetTube(‘O4′,’BJ-37’,508,304,19,19);
ret = PropFrame.SetTube(‘O5′,’BJ-37’,600,304,19,19);
% assign frame section by group
ret = FrameObj.SetSection(‘End Truss’,ENDsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment1’,TOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment2’,TOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment3’,TOS3section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment1’,BOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment2’,BOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment3’,BOS3section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalOrdinarySegment1’,DOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalOrdinarySegment2’,DOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘VerticalOrdinarySegment’,VOSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopSpecialSegment’,TSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomSpecialSegment’,BSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalSpecialSegment’,DSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘VerticalSpecialSegment’,VSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘Column’,COLsection,SAP2000v1.eItemType.Group);
%% running analyze
ret = File.Save(‘D:\REF FAROS\MATLAB\Prelim\Preliminarysection-‘+string(Specimen(ii)));
ret = SapModel.SetPresentUnits(SAP2000v1.eUnits.kN_m_C);
ret = Analyze.RunAnalysis();
%% check design steel section
% Add load combination
RespCombo = NET.explicitCast(SapModel.RespCombo,’SAP2000v1.cCombo’);
ret = RespCombo.Add(‘1.2D+1.6L’,0);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’DEAD’,1.2);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’SUPERDEAD’,1.2);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’LIVE’,1.6);
% DesignSteel
ret = DesignSteel.SetCode(‘AISC 360-10’);
ret = DesignSteel.SetComboStrength(‘1.2D+1.6L’,true);
ret = DesignSteel.SetComboAutoGenerate(false);
ret = DesignSteel.StartDesign();
ret = View.RefreshView(0, false());
%% set load case and combo for display table
LoadCaseList = NET.createArray(‘System.String’,6);
LoadCaseList(1)=’DEAD’;
LoadCaseList(2)=’MODAL’;
LoadCaseList(3)=’SUPERDEAD’;
LoadCaseList(4)=’LIVE’;
LoadCaseList(5)=’Gravity NLS’;
LoadCaseList(6)=’Pushover-UX’;
ret = DatabaseTables.SetLoadCasesSelectedForDisplay({‘MODAL’,’DEAD’,’SUPERDEAD’,’LIVE’,’Gravity NLS’,’Pushover-UX’});
LoadCombList = NET.createArray(‘System.String’,1);
LoadCombList(1)=’1.2D+1.6L’;
ret = DatabaseTables.SetLoadCombinationsSelectedForDisplay({‘1.2D+1.6L’});
ret = DatabaseTables.SetTableOutputOptionsForDisplay(0,0,0,true,1,12,true,1,12,2,2,2,2,2,3,1,1,2);
%% get frame label
NumberFrame = 0;
AllFrameName = {”};
[~,NumberFrame,AllFrameName] = FrameObj.GetNameList(NumberFrame,AllFrameName);
% Column
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("Column");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameCOL = string(ObjectName);
% Endtruss
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("End Truss");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameEND = string(ObjectName);
% Top Ordinary Segment (TOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("TopOrdinarySegment1");
ret = SelectObj.Group("TopOrdinarySegment2");
ret = SelectObj.Group("TopOrdinarySegment3");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameTOS = string(ObjectName);
% Bottom Ordinary Segment (BOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("BottomOrdinarySegment1");
ret = SelectObj.Group("BottomOrdinarySegment2");
ret = SelectObj.Group("BottomOrdinarySegment3");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameBOS = string(ObjectName);
% Diagonal Ordinary Segment (DOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("DiagonalOrdinarySegment1");
ret = SelectObj.Group("DiagonalOrdinarySegment2");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameDOS = string(ObjectName);
% Diagonal Ordinary Segment (VOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("VeticalOrdinarySegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameVOS = string(ObjectName);
% Top Special Segment (TSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("TopSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameTSS = string(ObjectName);
% Bottom Special Segment (BSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("BottomSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameBSS = string(ObjectName);
% Diagonal Special Segment (DSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("DiagonalSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameDSS = string(ObjectName);
% Vertical Special Segment (VSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("VerticalSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameVSS = string(ObjectName);
%% get alltable
NumberTables = 0;
TableKey = {”};
TableName = {”};
ImportType = 0;
IsEmpty = NET.createArray(‘System.Boolean’,NumberTables);
[ret,NumberTables,TableKey,TableName,ImportType,IsEmpty] = DatabaseTables.GetAllTables(NumberTables,TableKey,TableName,ImportType,IsEmpty);
TableKey = string(TableKey)’;
TableName = string(TableName)’;
ImportType = int32(ImportType)’;
IsEmpty = logical(IsEmpty)’;
TableKey = array2table(TableKey,"VariableNames",{‘TableKey’});
TableName = array2table(TableName,"VariableNames",{‘TableName’});
ImportType = array2table(ImportType,"VariableNames",{‘ImportType’});
IsEmpty = array2table(IsEmpty,"VariableNames",{‘IsEmpty’});
%Daftartabel = table(TableKey,TableName,ImportType,IsEmpty);
%Daftartabel = table2array(Daftartabel);
%% period of structure
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Modal Periods And Frequencies",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
Period{ii,:} = array2table(TableData,"VariableNames",FieldKeysIncluded);
%% Steel Design Check
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Steel Design 1 – Summary Data – AISC 360-10",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
steeldesignresult = array2table(TableData,"VariableNames",FieldKeysIncluded);
% check maximum ratio
ratio = steeldesignresult.Ratio(:);
ratio = strrep(ratio,’,’,’.’);
ratio = str2double(ratio);
maximumratio = sort(ratio,’descend’);
maximumratio = maximumratio(1);
ratiolimit = 1.00;
if maximumratio<ratiolimit
checkratio(ii) = ‘Ratio OK’;
else
checkratio(ii) = ‘Ratio exceeds allowable limit’;
end
ratioCOL{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameCOL));
ratioEND{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameEND));
ratioTOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameTOS));
ratioBOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameBOS));
ratioDOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameDOS));
ratioVOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameVOS));
ratioTSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameTSS));
ratioBSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameBSS));
ratioDSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameDSS));
ratioVSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameVSS));
%% pushover result
% base-shear
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Base Reactions",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
basereaction = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter1 = strcmp(basereaction.OutputCase,’Pushover-UX’);
baseshearpushx = basereaction(filter1,{‘StepNum’,’GlobalFX’,’GlobalFZ’});
% display displacement of monitored point
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Joint Displacements",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
jointdisplacement = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter1 = strcmp(jointdisplacement.Joint,’4′);
tableout1 = jointdisplacement(filter1,{‘OutputCase’,’StepNum’,’U1′});
filter2 = strcmp(tableout1.OutputCase,’Pushover-UX’);
point5disp = tableout1(filter2,{‘StepNum’,’U1′});
% pushover table
pushovertable{ii,:} = join(baseshearpushx,point5disp);
plotx = str2double(strrep(pushovertable{ii,1}.U1,’,’,’.’));
ploty = str2double(strrep(pushovertable{ii,1}.GlobalFX,’,’,’.’));
%plot(plotx,ploty);
%xlabel(‘Displacement(m)’);
%ylabel(‘Base Shear(kN)’);
%grid on;
%% display hinge states
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Frame Hinge States",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
hingeresult{ii,:} = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameCOL);
hingeCOL = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameEND);
hingeEND = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameTOS);
%hingeTOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameBOS);
%hingeBOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameDOS);
%hingeDOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameVOS);
%hingeVOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameTSS);
hingeTSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameBSS);
hingeBSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameDSS);
%hingeDSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameVSS);
%hingeVSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%% check fuse first yielding
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.HingeState,{‘B to C’});
firstyieldlist{ii,:} = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
stepfirstyield = firstyieldlist{ii,1}.StepNum(:);
stepfirstyield = str2double(stepfirstyield);
stepfirstyield = sort(stepfirstyield,’ascend’);
stepfirstyield = stepfirstyield(1);
stepfirstyield = int2str(stepfirstyield);
framefirstyield{ii,:} = firstyieldlist{ii,1}.Frame(strcmp(firstyieldlist{ii,1}.StepNum,stepfirstyield));
testfuse = ismember(framefirstyield{ii,1},[frameTSS,frameBSS]);
if testfuse == any(true)
checkfuse(ii) = ‘Fuse Correct’;
else
checkfuse(ii) = ‘Fuse wrong designed’;
end
end
end
end
end
end
end
end
end
end
end
end
toc
runningtime = toc;
%writecell(hingeresult,’hingeresult2173.xls’)
writematrix(Specimen,’specimen2173.xls’,’Sheet’,1)
writematrix(checkratio’,’checkratio2173.xls’,’Sheet’,1)
writematrix(checkfuse’,’checkfuse2173.xls’,’Sheet’,1)
%writecell(arrayfun(framefirstyield),’framefirstyield2173.xls’,’Sheet’,1)
%writematrix(firstyieldlist,’firstyieldlist2173.xls’,’Sheet’,1)
clc Hi guys, im trying to do looping ii 1:900 but why when u run it, it was never-ending loop. After reach 900, it will continue to 901 but using model with i = 1 (start again from beginning).
Here are my code:
%% clean-up the workspace & command window
clc;
clear;
clc;
tic;
%% Preparation to connect with OAPI SAP2000
%set the following flag to true to attach to an existing instance of the program otherwise a new instance of the program will be started
AttachToInstance = true();
% set the following flag to true to manually specify the path to ETABS.exe
% this allows for a connection to a version of ETABS other than the latest installation
% otherwise the latest installed version of ETABS will be launched
SpecifyPath = true();
% if the above flag is set to true, specify the path to ETABS below
ProgramPath = ‘C:Program FilesComputers and StructuresSAP2000 25SAP2000.exe’;
% full path to API dll set it to the installation folder
APIDLLPath = ‘C:Program FilesComputers and StructuresSAP2000 25SAP2000v1.dll’;
% create API helper objectETABSv1ETAB
a = NET.addAssembly(APIDLLPath);
helper = SAP2000v1.Helper;
helper = NET.explicitCast(helper,’SAP2000v1.cHelper’);
if AttachToInstance
% attach to a running instance of ETABS
SapObject = helper.GetObject(‘CSI.SAP2000.API.SapObject’);
SapObject = NET.explicitCast(SapObject,’SAP2000v1.cOAPI’);
else
if SpecifyPath
% create an instance of the ETABS object from the specified path
SapObject = helper.CreateObject(ProgramPath);
else
% create an instance of the ETABS object from the latest installed ETABS
SapObject = helper.CreateObjectProgID(‘CSI.SAP2000.API.SapObject’);
end
SapObject = NET.explicitCast(SapObject,’SAP2000v1.cOAPI’);
% start ETABS application
SapObject.ApplicationStart;
end
helper = 0;
% create SapModel object
SapModel = NET.explicitCast(SapObject.SapModel,’SAP2000v1.cSapModel’);
%% Define Variant Model
VariantModel = compose(‘%d’,2:2);
VariantENDT= compose(‘A%d’,1:5);
VariantTOS1= compose(‘B%d’,1:1);
VariantTOS2 = compose(‘C%d’,1:1);
VariantTOS3 = compose(‘D%d’,1:1);
VariantBOS1 = compose(‘E%d’,1:1);
VariantBOS2 = compose(‘F%d’,1:1);
VariantBOS3 = compose(‘G%d’,1:1);
VariantDOS1 = compose(‘H%d’,1:1);
VariantDOS2 = compose(‘I%d’,1:1);
VariantVOS = compose(‘J%d’,1:1);
VariantTSS = compose(‘K%d’,1:6);
VariantBSS = compose(‘L%d’,1:6);
VariantDSS = compose(‘M%d’,1:1);
VariantVSS = compose(‘N%d’,1:1);
VariantCOL = compose(‘O%d’,1:5);
%% Define Variable For Looping Analysis
Specimen = repmat("",length(VariantModel)*length(VariantENDT)*length(VariantTOS1)*length(VariantBOS1)*length(VariantDOS1)*length(VariantVOS)*length(VariantTSS)*length(VariantBSS)*length(VariantDSS)*length(VariantCOL),1);
Optimizevalue = zeros(1,length(Specimen));
checkratio = strings(1,length(Specimen));
CheckHingeCOL = strings(1,length(Specimen));
checkfuse = strings(1,length(Specimen));
R = zeros(1,length(Specimen));
W = zeros(1,length(Specimen));
Cg = zeros(1,length(Specimen));
ii = 0;
for i = 1:length(Specimen)
for iVAR = 1:length(VariantModel)
for iEND = 1:length(VariantENDT)
ENDsection = string(VariantENDT(iEND));
for iTOS = 1:length(VariantTOS1)
TOS1section = string(VariantTOS1(iTOS));
TOS2section = string(VariantTOS2(iTOS));
TOS3section = string(VariantTOS3(iTOS));
for iBOS = 1 : length(VariantBOS1)
BOS1section = string(VariantBOS1(iBOS));
BOS2section = string(VariantBOS2(iBOS));
BOS3section = string(VariantBOS3(iBOS));
for iDOS = 1 : length(VariantDOS1)
DOS1section = string(VariantDOS1(iDOS));
DOS2section = string(VariantDOS2(iDOS));
for iVOS = 1 : length(VariantVOS)
VOSsection = string(VariantVOS(iVOS));
for iTSS = 1 : length(VariantTSS)
TSSsection = string(VariantTSS(iTSS));
for iBSS = 1 : length(VariantBSS)
BSSsection = string(VariantBSS(iBSS));
for iDSSVSS = 1 : length(VariantDSS)
DSSsection = string(VariantDSS(iDSSVSS));
VSSsection = string(VariantVSS(iDSSVSS));
for iCOL = 1 : length(VariantCOL)
COLsection = string(VariantCOL(iCOL));
ii = ii+1;
Specimen(ii) = append(VariantModel(iVAR),VariantENDT(iEND),VariantTOS1(iTOS),VariantTOS2(iTOS),VariantTOS3(iTOS),VariantBOS1(iBOS),VariantBOS2(iBOS),VariantBOS3(iBOS),VariantDOS1(iDOS),VariantDOS2(iDOS),VariantVOS(iVOS),VariantTSS(iTSS),VariantBSS(iBSS),VariantDSS(iDSSVSS),VariantVSS(iDSSVSS),VariantCOL(iCOL));
%% DEFINE OAPI FUNCTION
ret = SapModel.InitializeNewModel(SAP2000v1.eUnits.kN_m_C);
File = NET.explicitCast(SapModel.File,’SAP2000v1.cFile’);
PropFrame = NET.explicitCast(SapModel.PropFrame,’SAP2000v1.cPropFrame’);
Group=NET.explicitCast(SapModel.GroupDef,’SAP2000v1.cGroup’);
FrameObj = NET.explicitCast(SapModel.FrameObj,’SAP2000v1.cFrameObj’);
Analyze = NET.explicitCast(SapModel.Analyze,’SAP2000v1.cAnalyze’);
DesignSteel = NET.explicitCast(SapModel.DesignSteel,’SAP2000v1.cDesignSteel’);
View = NET.explicitCast(SapModel.View,’SAP2000v1.cView’);
DatabaseTables = NET.explicitCast(SapModel.DatabaseTables,’SAP2000v1.cDatabaseTables’);
SelectObj = NET.explicitCast(SapModel.SelectObj,’SAP2000v1.cSelect’);
%% MODELING SAP2000
FileName = ‘D:\REF FAROS\MATLAB\Prelim\Prelimnarysection.s2k’;
ret = File.OpenFile(FileName);
ret = SapModel.SetPresentUnits(SAP2000v1.eUnits.N_mm_C);
% define frame section property for A(EndTruss)
ret = PropFrame.SetTube(‘A1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘A2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘A3′,’BJ-37’,203,203,12.7,12.7);
ret = PropFrame.SetTube(‘A4′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘A5′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for B(TOS1)
ret = PropFrame.SetTube(‘B1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘B2′,’BJ-37’,177,177,6.4,6.4);
ret = PropFrame.SetTube(‘B3′,’BJ-37’,203,203,6.4,6.4);
% define frame section property for C(TOS2)
ret = PropFrame.SetTube(‘C1′,’BJ-37’,152,152,7.9,7.9);
ret = PropFrame.SetTube(‘C2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘C3′,’BJ-37’,203,203,7.9,7.9);
% define frame section property for D(TOS3)
ret = PropFrame.SetTube(‘D1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘D2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘D3′,’BJ-37’,254,254,9.5,9.5);
% define frame section property for E(BOS1)
ret = PropFrame.SetTube(‘E1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘E2′,’BJ-37’,177,177,6.4,6.4);
ret = PropFrame.SetTube(‘B3′,’BJ-37’,203,203,6.4,6.4);
% define frame section property for F(BOS2)
ret = PropFrame.SetTube(‘F1′,’BJ-37’,152,152,7.9,7.9);
ret = PropFrame.SetTube(‘F2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘F3′,’BJ-37’,203,203,7.9,7.9);
% define frame section property for G(BOS3)
ret = PropFrame.SetTube(‘G1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘G2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘G3′,’BJ-37’,254,254,9.5,9.5);
% define frame section property for H(DOS1)
ret = PropFrame.SetTube(‘H1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘H2′,’BJ-37’,203,203,12.7,12.7);
ret = PropFrame.SetTube(‘H3′,’BJ-37’,254,254,12.7,12.7);
% define frame section property for I(DOS2)
ret = PropFrame.SetTube(‘I1′,’BJ-37’,152,152,6.4,6.4);
ret = PropFrame.SetTube(‘I2′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘I3′,’BJ-37’,203,203,12.7,12.7);
% define frame section property for J(VOS)
ret = PropFrame.SetTube(‘J1′,’BJ-37’,50,50,2.2,2.2);
% define frame section property for K(TSS)
ret = PropFrame.SetTube(‘K1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘K2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘K3′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘K4′,’BJ-37’,254,203,9.5,9.5);
ret = PropFrame.SetTube(‘K5′,’BJ-37’,304,254,12.7,12.7);
ret = PropFrame.SetTube(‘K6′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for L(BSS)
ret = PropFrame.SetTube(‘L1′,’BJ-37’,177,177,7.9,7.9);
ret = PropFrame.SetTube(‘L2′,’BJ-37’,203,203,9.5,9.5);
ret = PropFrame.SetTube(‘L3′,’BJ-37’,254,254,9.5,9.5);
ret = PropFrame.SetTube(‘L4′,’BJ-37’,254,203,9.5,9.5);
ret = PropFrame.SetTube(‘L5′,’BJ-37’,304,254,12.7,12.7);
ret = PropFrame.SetTube(‘L6′,’BJ-37’,304,304,12.7,12.7);
% define frame section property for M(DSS)
ret = PropFrame.SetTube(‘M1′,’BJ-37’,40,40,2.2,2.2);
% define frame section property for N(VSS)
ret = PropFrame.SetTube(‘N1′,’BJ-37’,30,30,2.2,2.2);
% define frame section property for O(COL)
ret = PropFrame.SetTube(‘O1′,’BJ-37’,406,304,15.9,15.9);
ret = PropFrame.SetTube(‘O2′,’BJ-37’,455,250,15.9,15.9);
ret = PropFrame.SetTube(‘O3′,’BJ-37’,508,250,15.9,15.9);
ret = PropFrame.SetTube(‘O4′,’BJ-37’,508,304,19,19);
ret = PropFrame.SetTube(‘O5′,’BJ-37’,600,304,19,19);
% assign frame section by group
ret = FrameObj.SetSection(‘End Truss’,ENDsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment1’,TOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment2’,TOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopOrdinarySegment3’,TOS3section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment1’,BOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment2’,BOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomOrdinarySegment3’,BOS3section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalOrdinarySegment1’,DOS1section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalOrdinarySegment2’,DOS2section,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘VerticalOrdinarySegment’,VOSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘TopSpecialSegment’,TSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘BottomSpecialSegment’,BSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘DiagonalSpecialSegment’,DSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘VerticalSpecialSegment’,VSSsection,SAP2000v1.eItemType.Group);
ret = FrameObj.SetSection(‘Column’,COLsection,SAP2000v1.eItemType.Group);
%% running analyze
ret = File.Save(‘D:\REF FAROS\MATLAB\Prelim\Preliminarysection-‘+string(Specimen(ii)));
ret = SapModel.SetPresentUnits(SAP2000v1.eUnits.kN_m_C);
ret = Analyze.RunAnalysis();
%% check design steel section
% Add load combination
RespCombo = NET.explicitCast(SapModel.RespCombo,’SAP2000v1.cCombo’);
ret = RespCombo.Add(‘1.2D+1.6L’,0);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’DEAD’,1.2);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’SUPERDEAD’,1.2);
ret = RespCombo.SetCaseList(‘1.2D+1.6L’,SAP2000v1.eCNameType.LoadCase,’LIVE’,1.6);
% DesignSteel
ret = DesignSteel.SetCode(‘AISC 360-10’);
ret = DesignSteel.SetComboStrength(‘1.2D+1.6L’,true);
ret = DesignSteel.SetComboAutoGenerate(false);
ret = DesignSteel.StartDesign();
ret = View.RefreshView(0, false());
%% set load case and combo for display table
LoadCaseList = NET.createArray(‘System.String’,6);
LoadCaseList(1)=’DEAD’;
LoadCaseList(2)=’MODAL’;
LoadCaseList(3)=’SUPERDEAD’;
LoadCaseList(4)=’LIVE’;
LoadCaseList(5)=’Gravity NLS’;
LoadCaseList(6)=’Pushover-UX’;
ret = DatabaseTables.SetLoadCasesSelectedForDisplay({‘MODAL’,’DEAD’,’SUPERDEAD’,’LIVE’,’Gravity NLS’,’Pushover-UX’});
LoadCombList = NET.createArray(‘System.String’,1);
LoadCombList(1)=’1.2D+1.6L’;
ret = DatabaseTables.SetLoadCombinationsSelectedForDisplay({‘1.2D+1.6L’});
ret = DatabaseTables.SetTableOutputOptionsForDisplay(0,0,0,true,1,12,true,1,12,2,2,2,2,2,3,1,1,2);
%% get frame label
NumberFrame = 0;
AllFrameName = {”};
[~,NumberFrame,AllFrameName] = FrameObj.GetNameList(NumberFrame,AllFrameName);
% Column
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("Column");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameCOL = string(ObjectName);
% Endtruss
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("End Truss");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameEND = string(ObjectName);
% Top Ordinary Segment (TOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("TopOrdinarySegment1");
ret = SelectObj.Group("TopOrdinarySegment2");
ret = SelectObj.Group("TopOrdinarySegment3");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameTOS = string(ObjectName);
% Bottom Ordinary Segment (BOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("BottomOrdinarySegment1");
ret = SelectObj.Group("BottomOrdinarySegment2");
ret = SelectObj.Group("BottomOrdinarySegment3");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameBOS = string(ObjectName);
% Diagonal Ordinary Segment (DOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("DiagonalOrdinarySegment1");
ret = SelectObj.Group("DiagonalOrdinarySegment2");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameDOS = string(ObjectName);
% Diagonal Ordinary Segment (VOS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("VeticalOrdinarySegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameVOS = string(ObjectName);
% Top Special Segment (TSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("TopSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameTSS = string(ObjectName);
% Bottom Special Segment (BSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("BottomSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameBSS = string(ObjectName);
% Diagonal Special Segment (DSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("DiagonalSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameDSS = string(ObjectName);
% Vertical Special Segment (VSS)
NumberItems=0;
ObjectType=0;
ObjectName={”};
ret = SelectObj.Group("VerticalSpecialSegment");
[~,NumberItems,ObjectType,ObjectName] = SelectObj.GetSelected(NumberItems,ObjectType,ObjectName);
ret = SelectObj.ClearSelection;
frameVSS = string(ObjectName);
%% get alltable
NumberTables = 0;
TableKey = {”};
TableName = {”};
ImportType = 0;
IsEmpty = NET.createArray(‘System.Boolean’,NumberTables);
[ret,NumberTables,TableKey,TableName,ImportType,IsEmpty] = DatabaseTables.GetAllTables(NumberTables,TableKey,TableName,ImportType,IsEmpty);
TableKey = string(TableKey)’;
TableName = string(TableName)’;
ImportType = int32(ImportType)’;
IsEmpty = logical(IsEmpty)’;
TableKey = array2table(TableKey,"VariableNames",{‘TableKey’});
TableName = array2table(TableName,"VariableNames",{‘TableName’});
ImportType = array2table(ImportType,"VariableNames",{‘ImportType’});
IsEmpty = array2table(IsEmpty,"VariableNames",{‘IsEmpty’});
%Daftartabel = table(TableKey,TableName,ImportType,IsEmpty);
%Daftartabel = table2array(Daftartabel);
%% period of structure
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Modal Periods And Frequencies",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
Period{ii,:} = array2table(TableData,"VariableNames",FieldKeysIncluded);
%% Steel Design Check
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Steel Design 1 – Summary Data – AISC 360-10",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
steeldesignresult = array2table(TableData,"VariableNames",FieldKeysIncluded);
% check maximum ratio
ratio = steeldesignresult.Ratio(:);
ratio = strrep(ratio,’,’,’.’);
ratio = str2double(ratio);
maximumratio = sort(ratio,’descend’);
maximumratio = maximumratio(1);
ratiolimit = 1.00;
if maximumratio<ratiolimit
checkratio(ii) = ‘Ratio OK’;
else
checkratio(ii) = ‘Ratio exceeds allowable limit’;
end
ratioCOL{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameCOL));
ratioEND{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameEND));
ratioTOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameTOS));
ratioBOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameBOS));
ratioDOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameDOS));
ratioVOS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameVOS));
ratioTSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameTSS));
ratioBSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameBSS));
ratioDSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameDSS));
ratioVSS{ii,:} = steeldesignresult.Ratio(ismember(steeldesignresult.Frame,frameVSS));
%% pushover result
% base-shear
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Base Reactions",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
basereaction = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter1 = strcmp(basereaction.OutputCase,’Pushover-UX’);
baseshearpushx = basereaction(filter1,{‘StepNum’,’GlobalFX’,’GlobalFZ’});
% display displacement of monitored point
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Joint Displacements",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
jointdisplacement = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter1 = strcmp(jointdisplacement.Joint,’4′);
tableout1 = jointdisplacement(filter1,{‘OutputCase’,’StepNum’,’U1′});
filter2 = strcmp(tableout1.OutputCase,’Pushover-UX’);
point5disp = tableout1(filter2,{‘StepNum’,’U1′});
% pushover table
pushovertable{ii,:} = join(baseshearpushx,point5disp);
plotx = str2double(strrep(pushovertable{ii,1}.U1,’,’,’.’));
ploty = str2double(strrep(pushovertable{ii,1}.GlobalFX,’,’,’.’));
%plot(plotx,ploty);
%xlabel(‘Displacement(m)’);
%ylabel(‘Base Shear(kN)’);
%grid on;
%% display hinge states
TableVersion = zeros(‘int32’);
FieldKeyList = {”};
FieldKeysIncluded = {”};
NumberRecords = zeros(‘int32’);
TableData = {”};
[ret,~,TableVersion,FieldKeysIncluded,NumberRecords,TableData] = DatabaseTables.GetTableForDisplayArray("Frame Hinge States",FieldKeyList,’All’,TableVersion,FieldKeysIncluded,NumberRecords,TableData);
TableVersion = int32(TableVersion);
FieldKeysIncluded = string(FieldKeysIncluded);
[ret,c,r] = size(FieldKeysIncluded);
c = int32(c);
r = int32(r);
NumberRecords = int32(NumberRecords);
TableData = cell(TableData);
TableData = reshape(TableData,c,[])’;
hingeresult{ii,:} = array2table(TableData,"VariableNames",FieldKeysIncluded);
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameCOL);
hingeCOL = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameEND);
hingeEND = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameTOS);
%hingeTOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameBOS);
%hingeBOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameDOS);
%hingeDOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameVOS);
%hingeVOS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameTSS);
hingeTSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameBSS);
hingeBSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameDSS);
%hingeDSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.Frame,frameVSS);
%hingeVSS = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
%% check fuse first yielding
filter = strcmp(hingeresult{ii,1}.OutputCase,’Pushover-UX’) & ismember(hingeresult{ii,1}.HingeState,{‘B to C’});
firstyieldlist{ii,:} = hingeresult{ii,1}(filter,{‘Frame’,’OutputCase’,’StepNum’,’GenHinge’,’RelDist’,’M3′,’R3Plastic’,’HingeState’,’HingeStatus’});
stepfirstyield = firstyieldlist{ii,1}.StepNum(:);
stepfirstyield = str2double(stepfirstyield);
stepfirstyield = sort(stepfirstyield,’ascend’);
stepfirstyield = stepfirstyield(1);
stepfirstyield = int2str(stepfirstyield);
framefirstyield{ii,:} = firstyieldlist{ii,1}.Frame(strcmp(firstyieldlist{ii,1}.StepNum,stepfirstyield));
testfuse = ismember(framefirstyield{ii,1},[frameTSS,frameBSS]);
if testfuse == any(true)
checkfuse(ii) = ‘Fuse Correct’;
else
checkfuse(ii) = ‘Fuse wrong designed’;
end
end
end
end
end
end
end
end
end
end
end
end
toc
runningtime = toc;
%writecell(hingeresult,’hingeresult2173.xls’)
writematrix(Specimen,’specimen2173.xls’,’Sheet’,1)
writematrix(checkratio’,’checkratio2173.xls’,’Sheet’,1)
writematrix(checkfuse’,’checkfuse2173.xls’,’Sheet’,1)
%writecell(arrayfun(framefirstyield),’framefirstyield2173.xls’,’Sheet’,1)
%writematrix(firstyieldlist,’firstyieldlist2173.xls’,’Sheet’,1)
clc loops, loop error, outloop MATLAB Answers — New Questions
how to get p-values from fit function
Hello, i’m trying to get p-value from a fitting performed with fit function, but i cannot find how to do so, i can only get r2 and RMSE.
Should i use some other function rather than fit?
here my code and the data, hope it will be understandable. thanks you very much in advance.
ft = fittype(‘(m*c*k*x)/((1-k*x)*(1+(c-1)*k*x))’, …
‘dependent’,{‘y’}, …
‘independent’,{‘x’}, …
‘coefficients’,{‘m’,’c’,’k’});
coef = ["Xm","Cg","K","R2","RMSE"];
figure (1);
[f,gof] = fit(x,y, ft,’StartPoint’,[0.2, 5, 1]);
plot(f);
hold on
plot(x,y);
figure(2);
plot(f,x,y,"residuals");
%save coefficients
format long g
c = coeffvalues(f);
R2 = gof.rsquare;
RMSE = gof.rmse;
r = horzcat(c,R2,RMSE);
coef = [coef;r];Hello, i’m trying to get p-value from a fitting performed with fit function, but i cannot find how to do so, i can only get r2 and RMSE.
Should i use some other function rather than fit?
here my code and the data, hope it will be understandable. thanks you very much in advance.
ft = fittype(‘(m*c*k*x)/((1-k*x)*(1+(c-1)*k*x))’, …
‘dependent’,{‘y’}, …
‘independent’,{‘x’}, …
‘coefficients’,{‘m’,’c’,’k’});
coef = ["Xm","Cg","K","R2","RMSE"];
figure (1);
[f,gof] = fit(x,y, ft,’StartPoint’,[0.2, 5, 1]);
plot(f);
hold on
plot(x,y);
figure(2);
plot(f,x,y,"residuals");
%save coefficients
format long g
c = coeffvalues(f);
R2 = gof.rsquare;
RMSE = gof.rmse;
r = horzcat(c,R2,RMSE);
coef = [coef;r]; Hello, i’m trying to get p-value from a fitting performed with fit function, but i cannot find how to do so, i can only get r2 and RMSE.
Should i use some other function rather than fit?
here my code and the data, hope it will be understandable. thanks you very much in advance.
ft = fittype(‘(m*c*k*x)/((1-k*x)*(1+(c-1)*k*x))’, …
‘dependent’,{‘y’}, …
‘independent’,{‘x’}, …
‘coefficients’,{‘m’,’c’,’k’});
coef = ["Xm","Cg","K","R2","RMSE"];
figure (1);
[f,gof] = fit(x,y, ft,’StartPoint’,[0.2, 5, 1]);
plot(f);
hold on
plot(x,y);
figure(2);
plot(f,x,y,"residuals");
%save coefficients
format long g
c = coeffvalues(f);
R2 = gof.rsquare;
RMSE = gof.rmse;
r = horzcat(c,R2,RMSE);
coef = [coef;r]; curve fitting, p value MATLAB Answers — New Questions
permutation in regression learner app
I am using statistical and machine learning toolbox to find a best model to predict my variable of interest. After having caculated my best model how can I compute permuation to asses the p value?I am using statistical and machine learning toolbox to find a best model to predict my variable of interest. After having caculated my best model how can I compute permuation to asses the p value? I am using statistical and machine learning toolbox to find a best model to predict my variable of interest. After having caculated my best model how can I compute permuation to asses the p value? #permutation #machinelearning #regression learner MATLAB Answers — New Questions
need help_how to count total with 2 criteria?
hi
I have a list of data that will run thru Dec
I like to count the total of Admin Type by Month that attend the Activities
May I know how to and not too sure if this table is best layout to do it.
Thank you
MonthActivitiesContractFullPartHourJan 2024Fitness Jan 2024Workshop Jan 2024Course Jan 2024Fitness Feb 2024Fitness Feb 2024Workshop Feb 2024Course Mar 2024Fitness Mar 2024Fitness Mar 2024Workshop
hi I have a list of data that will run thru Dec I like to count the total of Admin Type by Month that attend the ActivitiesMay I know how to and not too sure if this table is best layout to do it.Thank youMonthActivitiesContractFullPartHourJan 2024Fitness Jan 2024Workshop Jan 2024Course Jan 2024Fitness Feb 2024Fitness Feb 2024Workshop Feb 2024Course Mar 2024Fitness Mar 2024Fitness Mar 2024Workshop Read More
How to Secure Your QuickBooks Data with Remote Hosting
Securing your QuickBooks data is crucial, especially when leveraging remote hosting solutions. Here’s a comprehensive guide on how to ensure the security of your QuickBooks data with remote hosting:
Choose a Reliable Hosting Provider:
Select a reputable hosting provider with a proven track record of reliability and security. Look for providers that offer robust encryption, regular data backups, and stringent access controls.
Implement Multi-Factor Authentication (MFA):
Enable multi-factor authentication for accessing your QuickBooks account. This adds an extra layer of security by requiring users to provide additional verification, such as a code sent to their mobile device, in addition to their password.
Use Strong Passwords:
Encourage users to create strong, unique passwords for their QuickBooks accounts. Avoid using easily guessable passwords and consider implementing password management tools to securely store and manage passwords.
Encrypt Data Transmission:
Ensure that data transmitted between your device and the remote hosting server is encrypted using secure protocols such as SSL/TLS. This helps prevent unauthorized interception of sensitive information during transmission.
Restrict User Access:
Limit access to your QuickBooks data to only authorized users who need it for their job responsibilities. Implement role-based access controls to assign specific permissions and privileges based on each user’s role within the organization.
Regularly Update Software:
Keep your QuickBooks software and hosting environment up to date with the latest security patches and updates. This helps protect against vulnerabilities that could be exploited by malicious actors.
Monitor for Suspicious Activity:
Implement monitoring tools and procedures to detect and respond to any suspicious activity or unauthorized access attempts. This includes monitoring login attempts, file access logs, and system logs for any signs of unusual behavior.
Backup Data Regularly:
Implement regular backup procedures to ensure that your QuickBooks data is securely backed up in case of data loss or corruption. Store backups in a secure location, preferably offsite or in the cloud, to protect against physical damage or theft.
Educate Users on Security Best Practices:
Train users on security best practices, such as recognizing phishing attempts, avoiding suspicious links and attachments, and practicing good password hygiene. Regularly remind users of the importance of data security and their role in protecting sensitive information.
Perform Security Audits:
Conduct regular security audits and assessments of your remote hosting environment to identify any potential vulnerabilities or weaknesses. Address any findings promptly and continuously improve your security posture.
By following these best practices, you can help secure your QuickBooks data when leveraging remote hosting solutions, providing peace of mind knowing that your financial information is protected against unauthorized access and data breaches.
Securing your QuickBooks data is crucial, especially when leveraging remote hosting solutions. Here’s a comprehensive guide on how to ensure the security of your QuickBooks data with remote hosting:Choose a Reliable Hosting Provider:Select a reputable hosting provider with a proven track record of reliability and security. Look for providers that offer robust encryption, regular data backups, and stringent access controls.Implement Multi-Factor Authentication (MFA):Enable multi-factor authentication for accessing your QuickBooks account. This adds an extra layer of security by requiring users to provide additional verification, such as a code sent to their mobile device, in addition to their password.Use Strong Passwords:Encourage users to create strong, unique passwords for their QuickBooks accounts. Avoid using easily guessable passwords and consider implementing password management tools to securely store and manage passwords.Encrypt Data Transmission:Ensure that data transmitted between your device and the remote hosting server is encrypted using secure protocols such as SSL/TLS. This helps prevent unauthorized interception of sensitive information during transmission.Restrict User Access:Limit access to your QuickBooks data to only authorized users who need it for their job responsibilities. Implement role-based access controls to assign specific permissions and privileges based on each user’s role within the organization.Regularly Update Software:Keep your QuickBooks software and hosting environment up to date with the latest security patches and updates. This helps protect against vulnerabilities that could be exploited by malicious actors.Monitor for Suspicious Activity:Implement monitoring tools and procedures to detect and respond to any suspicious activity or unauthorized access attempts. This includes monitoring login attempts, file access logs, and system logs for any signs of unusual behavior.Backup Data Regularly:Implement regular backup procedures to ensure that your QuickBooks data is securely backed up in case of data loss or corruption. Store backups in a secure location, preferably offsite or in the cloud, to protect against physical damage or theft.Educate Users on Security Best Practices:Train users on security best practices, such as recognizing phishing attempts, avoiding suspicious links and attachments, and practicing good password hygiene. Regularly remind users of the importance of data security and their role in protecting sensitive information.Perform Security Audits:Conduct regular security audits and assessments of your remote hosting environment to identify any potential vulnerabilities or weaknesses. Address any findings promptly and continuously improve your security posture.By following these best practices, you can help secure your QuickBooks data when leveraging remote hosting solutions, providing peace of mind knowing that your financial information is protected against unauthorized access and data breaches. Read More
HAADJ and Intune with OKTA
My question is the following, Is it possible to use OKTA(Third party) as an authentication/Identity provider with Hybrid Azure ID join tenant and enroll devices to Intune? We need to adjust our environment to be able to utilize Intune.
To elaborate, Please find the below:
-In this environment, We can run AD Sync and sync devices to Azure as Hybrid Azure ID joined.
Same steps required here: Configure Hybrid Join in Azure Active Directory | Okta
– Sign in Settings in AD(Entra) Connect to “Do not configure” as recommended by Microsoft for Third party federation scenarios (Confirm if this the preferred scenario for AD connect with OKTA).
-Hybrid Entra ID join is currently being achieved with GPOs and not using SCP (Targeted deployment)
-Autoenrollment to MDM is enabled via GPO and correctly distributed to device/user.
Behavior:
-Devices show up in Azure however according to MS Intune pre-requisites, UPN in cloud and on-premises should match and mobility license should be assigned in cloud. The situation currently is the domain on-premises is contoso.com and users are provisioned via OKTA to cloud to have contosocorp.com, So upon login they get redirected to contosocorp.com thus having a mismatch in credentials. (in a test environment(without Okta), alternate UPN suffix in domains and trusts is added and UPN is changed to match cloud —> this worked).
-In order for Intune to enroll devices, The login credential should match and a login event to the windows device must appear in Azure Sign in logs(This is confirmed as a pre-requisite by Microsoft), Which is not the case here.
-Okta is set to Universal Sync which is not recommended by Okta as not compatible with AD sync according to the following https://help.okta.com/en-us/content/topics/provisioning/azure/haad-join/prereqs-haad.htm#Prerequi2.
-If we do use both Okta and AD connect, a user will be provisioned twice in cloud, Once with the contoso.com(without Okta) and once using contosocorp.com(using Okta – will include licensing).
–Questions are as following:
1-Any workarounds to use Intune to enroll devices without UPN matching in the current scenarios.
2-If we are to UPN match on Prem and cloud -> How can this be achieved without deprovisioning OKTA(Or removing Provisioning type: Universal sync)?
3-How can we avoid duplications (since both Okta and AD sync will provision users in 365)
Guidance will be very much appreciated. Thank you.
My question is the following, Is it possible to use OKTA(Third party) as an authentication/Identity provider with Hybrid Azure ID join tenant and enroll devices to Intune? We need to adjust our environment to be able to utilize Intune. To elaborate, Please find the below: -In this environment, We can run AD Sync and sync devices to Azure as Hybrid Azure ID joined.Same steps required here: Configure Hybrid Join in Azure Active Directory | Okta – Sign in Settings in AD(Entra) Connect to “Do not configure” as recommended by Microsoft for Third party federation scenarios (Confirm if this the preferred scenario for AD connect with OKTA).-Hybrid Entra ID join is currently being achieved with GPOs and not using SCP (Targeted deployment) -Autoenrollment to MDM is enabled via GPO and correctly distributed to device/user. Behavior:-Devices show up in Azure however according to MS Intune pre-requisites, UPN in cloud and on-premises should match and mobility license should be assigned in cloud. The situation currently is the domain on-premises is contoso.com and users are provisioned via OKTA to cloud to have contosocorp.com, So upon login they get redirected to contosocorp.com thus having a mismatch in credentials. (in a test environment(without Okta), alternate UPN suffix in domains and trusts is added and UPN is changed to match cloud —> this worked). -In order for Intune to enroll devices, The login credential should match and a login event to the windows device must appear in Azure Sign in logs(This is confirmed as a pre-requisite by Microsoft), Which is not the case here. -Okta is set to Universal Sync which is not recommended by Okta as not compatible with AD sync according to the following https://help.okta.com/en-us/content/topics/provisioning/azure/haad-join/prereqs-haad.htm#Prerequi2. -If we do use both Okta and AD connect, a user will be provisioned twice in cloud, Once with the contoso.com(without Okta) and once using contosocorp.com(using Okta – will include licensing). -Questions are as following:1-Any workarounds to use Intune to enroll devices without UPN matching in the current scenarios.2-If we are to UPN match on Prem and cloud -> How can this be achieved without deprovisioning OKTA(Or removing Provisioning type: Universal sync)?3-How can we avoid duplications (since both Okta and AD sync will provision users in 365) Guidance will be very much appreciated. Thank you. Read More
2210 HF4 still broken on Server 2019 and new Teams
Hi Everyone,
so, I assume everyone’s been testing the new 2210 HF4 this morning/last night?
I’ve got two Citrix Session Hosts, Server 2022 and Server 2019
Both of them have the latest FSLogix installed, and they share the same GPO for the FSLogix configuration.
They’ve also got a common redirections.xml file for both Servers. Logging into a Session host creates both a normal profile folder and a local_<user> folder for redirected folders/files
For testing, I’ve been deleting the vhdx files between tests on each server, so there’s no potential issues using a profile container between the two different OSes.
Also, I’ve only got a single profile container configured – I’m not using an Office container
I’ve also got the latest new Teams installed on both servers. Server 2022 was installed via the bootstrapper and Server 2019 was installed via DISM as per the recommended method.
Server 2022 – when i log in to this OS using a test account configured for FSLogix, and start new Teams, everything is fine. When i log off, both the user profile and local_<user> folders get deleted.
Server 2019 – Doing exactly the same operation on this server, after starting new Teams, then logging off, the local_<user> folder fails to get deleted. The error message in the FSLogix operational logs are “Error removing directory: C:userslocal_<xxxx>AppDataLocalMicrosoftIdentityCache1UD…. The process cannot access the file because it is being used by another process)”
Note that the location under AppDataLocal… can change between different tests as there are a lot of different files locked and this is the first file FSLogix came across during the logoff process.
Running sysinternals Handle64.exe shows that the files are open by “System” (pid = 4)
Also, I can’t delete the folders manually as administrator after the user has logged off either, unless i reboot the server.
This issue only occurs after I’ve run new Teams for the first time. If i start clean without a profile container, log in, start Word, Excel, Outlook, etc, but don’t start new Teams, the issue doesn’t occur. Once I’ve started Teams, even if i shut it down, the local_<user> folder can’t be removed/deleted.
Anyone else experiencing this?
Hi Everyone, so, I assume everyone’s been testing the new 2210 HF4 this morning/last night? I’ve got two Citrix Session Hosts, Server 2022 and Server 2019Both of them have the latest FSLogix installed, and they share the same GPO for the FSLogix configuration. They’ve also got a common redirections.xml file for both Servers. Logging into a Session host creates both a normal profile folder and a local_<user> folder for redirected folders/filesFor testing, I’ve been deleting the vhdx files between tests on each server, so there’s no potential issues using a profile container between the two different OSes.Also, I’ve only got a single profile container configured – I’m not using an Office containerI’ve also got the latest new Teams installed on both servers. Server 2022 was installed via the bootstrapper and Server 2019 was installed via DISM as per the recommended method. Server 2022 – when i log in to this OS using a test account configured for FSLogix, and start new Teams, everything is fine. When i log off, both the user profile and local_<user> folders get deleted. Server 2019 – Doing exactly the same operation on this server, after starting new Teams, then logging off, the local_<user> folder fails to get deleted. The error message in the FSLogix operational logs are “Error removing directory: C:userslocal_<xxxx>AppDataLocalMicrosoftIdentityCache1UD…. The process cannot access the file because it is being used by another process)” Note that the location under AppDataLocal… can change between different tests as there are a lot of different files locked and this is the first file FSLogix came across during the logoff process. Running sysinternals Handle64.exe shows that the files are open by “System” (pid = 4)Also, I can’t delete the folders manually as administrator after the user has logged off either, unless i reboot the server. This issue only occurs after I’ve run new Teams for the first time. If i start clean without a profile container, log in, start Word, Excel, Outlook, etc, but don’t start new Teams, the issue doesn’t occur. Once I’ve started Teams, even if i shut it down, the local_<user> folder can’t be removed/deleted. Anyone else experiencing this? Read More