Pages

Your Ad Here

Thursday, 13 November 2014

NX Customization

NX, formerly known as NX Unigraphics or usually just U-G, is an advanced high-end CAD/CAM/CAE software package originally developed Unigraphics, but since 2007 by Siemens PLM Software.
It is used, among other tasks, for:
  • Design (parametric and direct solid/surface modelling)
  • Engineering analysis (static, dynamic, electro-magnetic, thermal, using the Finite Element Method, and fluid using the finite volume method).
  • Manufacturing finished design by using included machining modules.







Use the NX API to Automate Product Development with Your Product and Process Knowledge
NX gives you a wide range of programming and customization tools to help you extend and tailor NX software capabilities to your specific needs. With simple, rapid automation capabilities and expert programming utilities, these NX customization tools can be employed by product development personnel as well as application developers.

Journaling for Rapid Automation

NX also offers a journaling capability that records, edits and replays interactive NX sessions. You can edit the sessions with simple programming constructs and user interface components to rapidly create customized programs.

Customizing the User Interface


With menu and dialog box customization tools, you can easily tailor the NX user interface to your preferences, or create menus and dialog boxes for custom programs. These tools support interactive visual and drag-and-drop methods that streamline the process.

Tools for Application Developers
For programming specialists, NX delivers a robust API that supports standard integrated development environments. This language-neutral API provides complete access to NX core application functionality, and supports identical automation for Visual Basic, .NET, C#, Java and Open C++.
Lets learn about journaling first. Journaling is a procedure to get repeated process automated without much effort. User has to record journal first for the activity to be performed. This journal can be called then using menu options from NX.

Saturday, 20 September 2014

General interview questions:


Consolidated questions till now:
1. Linq functions
2. Entity framework
3. How the collections stored over the heap and stack memory?
4. Events and Delegates -  Simple and multicast delegates
5. WPF styling, converters
6. Control template and data template, Item template
7. Triggers/Actions in WPF
8. What type of Bindings are there? which one you have used and why?
9. Dependency Injection and Unity container
10. What is Command?
11. How to navigate from one wpf page to other?
12. Why dependency properties over simple properties? Attached properties?
13. Using telerik/activePro controls
14. What is Dependency object?
16. WCF - ABC types - all three
17. Why WCF - not web services?
18. SQL - basics - stored procedures, triggers, CRUD
19. Serialization/Deserialization in current project - using binary formatter
20. Is class an object?  - Everything in OOP is an object.
21. is C# case sensitive? Yes
22. Sorting and searching algorithms
23. Design patterns - App
24. What is HttpHandlers?
25. Finalize and Dispose method
26. How garbage collector works
27. What are params?
28. UML Diagrams
29. Object initializer
30.  what kind of compiler you are using? - JIT compiler
31. What type of assemblies are there?
32. Difference between executable and dll?
33. Difference between custom control and user control?
34. Dictionary Vs. HashTable
35. Array Vs ArrayList Vs List<T>
36. Await and Async
37. Singleton Vs. Static constructor
38. Server.Transfer Vs Response.Redirect
39. Generic type collection imlementation
40. Association Vs Aggregation Vs Composition


Thursday, 11 November 2010

using NX API

UGS NX is a tool to create and simulate CAD designs.

NX™ programming and customization software tools help companies extend
and tailor NX solution capabilities to their specific needs. Supporting the
knowledge-driven automation capabilities of NX, these tools can be
employed by product development personnel and application developers.
The NX Common Application Programming Interface (API)
NX software provides an automation architecture that serves as the
foundation for all NX APIs as well as for a new journaling utility. Called the
Common API, it combines the power of journaling and automation with the
freedom of a language-neutral platform. Integrated within the core NX
architecture, the Common API is the foundation for all NX solutions and is
fully compatible with the existing Open C API.


NX Open Common Application Programming Interface (API)
The new Common API offers the following features:
• Language support – Provides a native .NET API that supports all .NET languages including Visual Basic .NET and C#. The Java and Open C++ APIs support the full range of Common API capabilities.
• Support for standard integrated development environments (IDEs) – Visual Studio .NET development environment is the industry standard IDE for developing .NET programs. It provides state-of-the-art browsing, editing, debugging, graphical layout of dialogs (WinForms and WebForms) and a unified IDE for web, desktop and mobile development needs. Visual Studio .NET is the recommended IDE for developing NX Open .NET programs. Similarly, Java integrated development environments – Eclipse, etbeans, etc. offer development of platform-independent Java automation programs which may use the JFC/Swing API for interactive user interface. Custom programs using
NX Open for Java API can utilize any of the industry standard Java IDEs forapplication development.


While using NX API, the functionality includes:-

1. First of all, a WPF application is linked to NX. On click of NXOpen button will open NX with the specified plmxml file.

2. Once the NX model is open, to get latest updated expressions, it again goes to .NET code, catches the expressions and update in the model.

Reading a dll into IL file



I went through many blogs and forums when I was required to read a dll and understand if particular string value exists in the dll or not.
I wanted to read dll not for the business logic but for the string value present in dll or not.

Though Ildasm.exe tool is a great help but it tells about the properties and methods in the dll, not about the string value. When you double click on the content in ildasm window then it shows IL (intermediate language).

So now I want to create and read the IL file from this particular DLL.

Code as given below: -

string mSILlocation = "D:\\InterfacingService.il";
string command1 = dllLocation.Insert(dllLocation.Length, mSILlocation).Insert(dllLocation.Length, " /output:");
//string Command = "[DLL Location] /output:[location of new IL file created](file.il)";
int ExitCode;
ProcessStartInfo ProcessInfo;
System.Diagnostics.Process Process;

ProcessInfo = new ProcessStartInfo("C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\bin\\ildasm.exe", command1);
ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = false;
Process = Process.Start(ProcessInfo);
Process.WaitForExit(Timeout);
ExitCode = Process.ExitCode;
Process.Close();

Tuesday, 5 October 2010

Click Once deployment

Deployment Technologies
________________________________________
Windows and the .NET Framework include several deployment technologies, including:
• XCopy deployment.
• Windows Installer deployment.
• ClickOnce deployment.
XCopy Deployment
XCopy deployment refers to the use of the XCopy command-line program to copy files from one location to another. XCopy deployment is suitable under the following circumstances:
• The application is self-contained. It does not need to update the client to run.
• Application files must be moved from one location to another, such as from a build location (local disk, UNC file share, and so on) to a publish location (Web site, UNC file share, and so on).
• The application does not require shell integration (Start menu shortcut, desktop icon, and so on).
Although XCopy is suitable for simple deployment scenarios, it is limited when more complex deployment capabilities are required. In particular, using XCopy often incurs the overhead for creating, executing, and maintaining scripts for managing deployment in a robust way. Furthermore, XCopy does not support versioning, uninstallation, or rollback.
Windows Installer
Windows Installer allows applications to be packaged as self-contained executables that can be easily distributed to clients and run. Furthermore, Windows Installer is installed with Windows and enables integration with the desktop, the Start menu, and the Programs control panel.
Windows Installer simplifies the installation and uninstallation of applications, but it does not provide facilities for ensuring that installed applications are kept up-to-date from a versioning standpoint.
ClickOnce Deployment
ClickOnce enables Web-style application deployment for non-Web applications. Applications are published to and deployed from Web or file servers. Although ClickOnce does not support the full range of client features that Windows Installer-installed applications do, it does support a subset that includes the following:
• Integration with the Start menu and Programs control panel.
• Versioning, rollback, and uninstallation.
• Online install mode, which always launches an application from the deployment location.
• Automatic updating when new versions are released.
• Registration of file extensions.

Deploying WPF Applications
________________________________________
The deployment options for a WPF application depend on the type of application. From a deployment perspective, WPF has three significant application types:
• Standalone applications.
• Markup-only XAML applications.
• XAML browser applications (XBAPs).
Deploying Standalone Applications
Standalone applications are deployed using either ClickOnce or Windows Installer. Either way, standalone applications require full trust to run. Full trust is automatically granted to standalone applications that are deployed using Windows Installer. Standalone applications that are deployed using ClickOnce are not automatically granted full trust. Instead, ClickOnce displays a security warning dialog that users must accept before a standalone application is installed. If accepted, the standalone application is installed and granted full trust. If not, the standalone application is not installed.
Deploying Markup-Only XAML Applications
Markup-only XAML pages are usually published to Web servers, like HTML pages, and can be viewed using Internet Explorer. Markup-only XAML pages run within a partial-trust security sandbox with restrictions that are defined by the Internet zone permission set. This provides an equivalent security sandbox to HTML-based Web applications.
Markup-only XAML pages can be installed to the local file system by using either XCopy or Windows Installer. These pages can be viewed using Internet Explorer or Windows Explorer.
Deploying XAML Browser Applications
XBAPs are compiled applications that require the following three files to be deployed:
• ApplicationName.exe: The executable assembly application file.
• ApplicationName.xbap: The deployment manifest.
• ApplicationName.exe.manifest: The application manifest.

Courtesy: MSDN

Click Once Deployment:

There are three strategic approach to deploy application using Click once.

1. Install from Web or network share.
2. From CD or drive
3. Start application from web or network share.

The project iTracs is a standalone application. It can be installed from network. And then it requires services and centralized database from network to work on the application.

There are few tools available for click once deployment.
http://www.clickoncemore.net/home.php

Observable Collection

ObservableCollection is very important feature of data binding in WPF.
It is like a regular collection other than it can raise two more events. Which are INotifyCollectionChanged and INotifyPropertyChanged events. As the name suggests when collection is changed (item is added or removed) then INotifyCollectionChanged event will be raised.

If a property is changed in collection or count of collection is changed then INotifyCollectionChanged event is raised.



For more details you can try here:
http://www.e-pedro.com/2009/04/an-introduction-to-observablecollection-in-wpf/

INotifyPropertyChanged interface is implemented with method OnPropertyChanged().
This method will notify to UI (xaml) that this property is changed.

Saturday, 2 October 2010

Dependency Property in WPF.

public static readonly DependencyProperty MaskProperty =
DependencyProperty.Register("Mask", typeof(string), typeof(PTextBox), new PropertyMetadata(null));

public string Mask
{
get { return (string)GetValue(MaskProperty); }
set { SetValue(MaskProperty, value); }
}

First section explains about Dependency property. It is a static property. In old ways, Void was used to override the property, but without overriding we can reuse the same property.
“
In the "old ways", to set up some sort of change notification on the Height property here, you would have had to override it in a new class deriving from this FrameworkElement class and added whatever you needed in the 'set' part of the property here. However, you no longer have to do things like that. Instead, you can use Dependency properties.”

Eg: Mask is the property present in PTextBox class with type string. So first MaskProperty is created as DependencyProperty.

Then Mask property wrapper is created using GetValue() and SetValue() methods.

::http://www.switchonthecode.com/tutorials/wpf-tutorial-introduction-to-dependency-properties