PARTHIBAN KANNAN

Think Special… Do Special…

Creo Drawing Program to utilize the Same Engineering drawing for both First angle and Third angle Projection

Can you use the same engineering drawing for the First and Third Angle drawing Manufacturers?

Here we have to send the same casting drawing to the both manufacturer with their requirement.

Creating multiple drawings for the same model is a bad Idea. During changes in the model causes update required for all the drawings

So create same drawing to use both First angle and the Third angle projection

I am going to control the drawing based on the model parameter named SUPPLIER . Based on the SUPPLIER value the drawing will update the view state.

If the Supplier value in parameter is “USA” then the drawing view state in First Angle Projection otherwise it should be in Third angle projection

CREATE MODEL AND ADD PARAMETER

Front and Back View of the Casting Model

  1. Create the 3D Solid Model. Here I have created the casting model shown in the figure
    Front and Back View of the Casting Model

    Front and Back View of the Casting Model

    Create Model Parameter in Creo

  1. Go to the Tool → Parameter

"<yoastmark

  1. Create a New parameter named SUPPLIER and Set the Value EUROPE

"<yoastmark

CREATE DRAWING AND PLACE VIEWS

  1. Now Create the Drawing for the model and place the General View and the Default Projection Views of the model (My Default Projection in Third Angle)
Place General and Projection Views

Place General and Projection Views

Fig1: Place general and default projection views

CREATE VIEW STATES 

  1. Go to the Tools → Drawing Program

    Create Drawing Program in CREO

    Create Drawing Program in CREO

  2. Select Define States
  3. Create States named FIRST_ANGLE and THIRD_ANGLE
Create View State in Creo Drawing Program

Create View State in Creo Drawing Program

RECORD COMMANDS FOR THIRD ANGLE VIEW STATE

Now record the commands for THIRD_ANGLE

  1. Go to Drawing Program → Define States → Edit State → THIRD_ANGLE → Record Cmds
Record Commands for Third Angle Project View State

Record Commands for Third Angle Project View State

  1. Select Views and move the General and projection views as per Third Angle Projection
Move Views in Creo Drawing Program

Move Views in Creo Drawing Program

The adjusted Projection View for the Third angle

Adjusted Views for THIRD_ANGLE View State

Adjusted Views for THIRD_ANGLE View State

  1. Click Done to complete the Record Command for THIRD_ANGLE State

RECORD COMMANDS FOR FIRST ANGLE VIEW STATE

Now repeat the same steps to Create FIRST_ANGLE State

  1. Go to Drawing Program → Define States → Edit State → FIRST_ANGLE → Record Cmds
Record Commands for FIRST_ANGLE View State

Record Commands for FIRST_ANGLE View State

  1. Select Views and move the General and projection views as per First Angle Projection

The adjusted Projection View for First angle

Adjusted Views for FIRST_ANGLE View State

Adjusted Views for FIRST_ANGLE View State

  1. Click Done to complete the Record Command for FIRST_ANGLE State

APPLY THE CONDITION / LINK WITH MODEL PARAMETER

Let us control the states via the Parameter using If condition in the Drawing Program

  1. Go to the Drawing Program → Edit Program → File Edit
  2. Just write down this code with your notepad editor.

IF SUPPLIER == “USA

 SET STATE FIRST_ANGLE

ELSE

 SET STATE THIRD_ANGLE

ENDIF

Apply the conditions with Creo Drawing Program

Here

SUPPLIER is the Parameter we created with the model

USA is the value for the Parameter SUPPLIER

FIRST_ANGLE and THIRD_ANGLE is the States we have created with Drawing Program

That’s all

Now just change the Model Parameter SUPPLIER Value to USA which results the drawing automatically change it state to First Angle and for other parameter value results in Third Angle state.

Hope you’re enjoyed this post…

Thank you

Get Software Bugs via Outlook Mail

Send Bugs Via Mail

[sgrb_review id=2]

Some Bugs are an inevitable at the client side due to the environment changes in clients place such as System Configuration, Server configuration, Database configuration, & much more stuff.

Sometimes, we cannot get the proper technical information from the client side about the bug. We have to find out the function where the bugs occur. To resolve these issues, we need to implement proper bugs handling method with our coding.

In this method, You will learn to

  • Capture the bug details
  • Use Outlook Interop Service
  • Get the error function name at runtime

Here, Vb.Net Project & Outlook Interop Service – Used

 

STEPS TO IMPLEMENT THIS SYSTEM

  1. Create a Module name “mdlErrorHandling.vb” in  in your VB.Net Project
  2. Create a shared Function named “func_sendToDeveloper” inside the mdl_ErrorHandling class
  3. Call the function func_sendToDeveloper wherever need to capture exception

[Simply Copy & Paste the below Code to your file]

    Public Shared Function func_sendToDeveloper(Exception As String)

        Try

‘SET THE NAME OF THE FILE HANDLING BY THE APPLICATION  – FILE NAME VERY MUCH USABLE IN BUG TEST

            Dim FileName = “DOCUMENT-1”   

‘SET THE APPLICATION NAME – TO HANDLE APPLICATION WITH THE CLIENT

            Dim ApplicationName = “APPLICATION-1” 

‘SET THE SUBJECT TO DISPLAY IN MAIL VIEW

            Dim Subject As String = “NEW BUG : “ & ApplicationName & ” – “ & FileName    

            Dim Body As String = Exception

‘SET THE DEVELOPER MAIL TO GET THE BUG DETAILS

            Dim ToMail As String = “cse@jkparthiban.com”   

‘SET THE CC OPTION TO ADD MANAGER OR SOME OTHERS MAIL ID FOR BUG REVIEW (OPTIONAL)

            Dim CCMail As String = “manager@jkparthiban.com

‘SET THE FILE NAME IF YOU WOULD LIKE ADD ATTACHMENT WITH THE MAIL

            Dim AttachmentName As String = “”   

            Dim DisplayName As String = “BUG at “ & ApplicationName

‘CALL THE OUTLOOK INTEROP SERVICE

            Dim OutlookApp As Interop.Outlook._Application

            OutlookApp = New Interop.Outlook.Application   

‘CREATE A NEW E-MAIL ITEM

            Dim OutlookMessage As Interop.Outlook._MailItem

            OutlookMessage = OutlookApp.CreateItem(Interop.Outlook.OlItemType.olMailItem)  

‘ SET SUBJECT OF THE E-MAIL

            OutlookMessage.Subject = Subject 

  ‘ SET THE BODY CONTENT AS EXCEPTION DETAILS

            OutlookMessage.Body = Body    

‘SET THE TO MAIL TO DEVELOPER         

  OutlookMessage.To = ToMail

 ‘SET THE CARBON COPY TO MANAGER (OPTIONAL)    

            OutlookMessage.CC = CCMail         

‘ADD ATTACHMENT WITH YOUR MAIL

            If AttachmentName <> “Directory:\File.ext” Then   

                Dim BodyLen As Integer = Int(Body.Length)

                Dim OutlookAttachments As Interop.Outlook.Attachments = OutlookMessage.Attachments

                Dim OutlookAttachment As Interop.Outlook.Attachment = OutlookAttachments.Add(AttachmentName, BodyLen, DisplayName)

            End If

‘SEND THE MAIL

            OutlookMessage.Send()        

        Catch ex As Exception                   ‘ GET THE EXCEPTION ANYTHING OCCURS

‘GET THE CURRENT FUNCTION NAME TO CAPTURE THE METHOD WHERE EXCEPTION OCCURS

            Dim FunctionName As String = Reflection.MethodBase.GetCurrentMethod.ToString    

   ‘SEND THE EXCEPTION DETAILS TO THE DEVELOPER, IF EXCEPTION OCCURS IN THIS FUNCTION

            func_sendToDeveloper(ex.ToString)                                      

        End Try

    End Function

 


[Call this code wherever exception need to capture]

Now call the below codes in your project wherever catching exception

‘GET THE CURRENT FUNCTION NAME TO CAPTURE THE METHOD WHERE EXCEPTION OCCURS

            Dim FunctionName As String = Reflection.MethodBase.GetCurrentMethod.ToString    

   ‘SEND THE EXCEPTION DETAILS TO THE DEVELOPER

            func_sendToDeveloper(ex.ToString)                                         

 Note: You have to implement try…catch to capture the exception


Now you are ready to get the bugs via mail.

 

 

 

 

 

Shell Idealization Over the Solid Model in Geometric Element Analysis

[sgrb_review id=3]Hello Guys,

Here, I am going to explain about the advantages of shell idealization over the solid model. I have done Geometric Element Analysis on sheet metal bracket using Creo Simulate (Pro Mechanica)

I have considered 2 cases, one for the sheet metal bracket with the 3D solid model and another one for the same component of 2D Shell model.

1.BOUNDARY CONDITIONS

Following Boundary and Design, Considerations are taken for the analysis

Units

S.NO Unit Value
1. Length Mm
2. Mass Kg
3. Time Sec
4. Temperature C

 

Material Details

S.NO Description Value
1. Material Steel
2. Density 7.83*10^-06 Kg/mm^3
3. Young’s Modulus 200 GPa
4. Poisson’s Ratio 0.27
5. Symmetry Isotropic

Sheet Metal Bracket

Model

The drawing details of the model Considered for this analysis

Load

Uniformly distributed Load  of 100 Kg applied on loading area (mentioned in the figure)

Constraints

All the Degree Of Freedom fixed at the M8 tap hole (mentioned in the figure)

 

2. MESHING

In Creo Simulate, the default solver is Auto GEM, which uses p-method to solve the model i.e. It uses the highest polynomials order of each element to solve the element equation instead of changing the number of elements (like FEA method) i.e. it changing the element shape to get the better result. That’s why Creo Simulate also called Geometric Element Analysis (GEA) application.

 

Case 1: Mesh – Sheet Metal 3D Solid Model

In this case, the model considered as solid. The model meshed with the Auto GEM option with the maximum element size of 6 mm.

 

Solid Model meshed with CREO Auto GEM

Solid Model meshed with CREO Auto GEM

Auto GEM created totally 8689 Tetrahedron elements on Solid Model in 0.03 minutes.

Case 2: Mesh – Sheet Metal 2D Shell Idealized

In this case, thin mid-shell made on the solid model using shell pair option in the Creo Simulate & meshing done with the Auto GEM

Shell Model meshed using CREO Auto GEM

Shell Model meshed using CREO Auto GEM

Auto GEM created totally 248 triangular & 664 Quadrilateral elements in Shell Model in less than 0.01 minutes

 Solid Mesh Vs Shell Mesh

This chart shows the difference of meshing operation between the 3D Solid model & the 2D Shell model

Mesh Comparison between 3D solid model vs 2d shell model

Mesh Comparison between 3D solid model vs 2d shell model

From the chart, it clearly shows solid model takes more time for meshing than shell model because it creates a large number of 3D elements while the shell model requires less number of 2D elements. 

here the 3D Solid model takes nearly 10 times more elements than 2D Shell model.

3.RESULT COMPARISON

Figure shows the difference between displacement analysis of solid and shell model. The result variation between both cases is less than 1%.

3D SOLID MODEL - DISPLACEMENT ANALYSIS

3D SOLID MODEL – DISPLACEMENT ANALYSIS

 

2D SHELL MODEL - DISPLACEMENT ANALYSIS

2D SHELL MODEL – DISPLACEMENT ANALYSIS

From the analyzed result the deformed magnitude displacement of the solid model is 2.44 mm and the shell model is 2.49 mm. The variation in result between the both cases are very low.

 I have generated following charts to understand the difference between both cases

Displacement Variation between 3D Solid model vs 2D Shell Model

Displacement Variation between 3D Solid model vs 2D Shell Model

 Total analysis takes 7.65 seconds for the shell model and 24.42 seconds for the solid model. The disk space consumed by the solid model is 175 Mb and the shell mode is 35 Mb

Time & Disk space consumption between 3D Solid & 2D Shell Model

Time & Disk space consumption between 3D Solid & 2D Shell Model

 OBSERVED ADVANTAGES

  1. The 2D Shell model of the component takes less time to mesh comparatively the 3D Solid model of the same component
  2. Displacement result varies less than 1% between the 2D shell model & the 3D solid model of the same component
  3. The 3D solid model of the component nearly consumes  3 times more TIME than the 2D shell model of the same component 
  4. The 3D solid model of the component requires nearly 5 times more disk space than the 2D shell model of the same component 

LIMITATION

  1. The 2d Shell model only applicable for the model with symmetric projection from the midplane like Sheet Metal Components.
  2. Not suitable for Non-Linear analysis such as Large deformation & contact.( Paul Kloninger suggested)

CONCLUSION

Creo Simulates (Pro Mechanica) provides the powerful option Shell pair for extracting mid-plane from the solid model. Analysis with the mid-plane efficiently savings the time taken and the disk space for an analysis.

 

See more comments about this article from PTC Community

PTC Communityhttps://www.ptcusercommunity.com/docs/DOC-9741

 

 

How to Install, Register, & Configure Creo VB API Toolkit component in Creo Parametric

[sgrb_review id=1]For those trying to CAD Automation in Creo using VB API, here is your first article.,you must read before a start. you need to install VB API along with Creo, Register your batch file and also you need to configure your PC for VB API works. Let us see how to make this.

INSTALLATION:

If you have  PTC account you can directly access the PTC article to install VB API with this link

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS141739&lang=en&source=snippet

(Or)

Follow below procedure to Install VB API Toolkit component while installing Creo first time OR to add it to an existing Creo Installation.

  1. Run setup.exe from Creo DVD to launch PTC Install Assistant
  2. Select the Task as Install new software

    Creo Installation

  3. Accept License and Export Agreement
  4. Complete License Identification
  5. Select Customize button on the Application Selection page and select the component VB API for Creo Parametric under API Toolkits as shown in the image below.

    Select VB API

  6. Complete the Installation.

REGISTER

Follow the below procedure to register VB API with CREO 

  1. Please ensure all the Creo parametric process are not running
  2. Go to the PTC Installation folder
  3. Go to → PTC /Creo 2.0 /Parametric /bin Folder
  4. Search the file named vb_api_register.bat
  5. Run that file in administrative mode

{Administrative mode is mandatory}

  1. Now the Command prompt will open.
  2. Please wait until the Command prompt will close automatically {It will not take more than 30 seconds}.
  3. Yeah, you are ready to configure your PC Now.

CONFIGURE

To use VB API you need to configure your PC Environment Variables.

  1. Go to the My Computer then right click and open properties
  2. Click the Advanced system settings

Advanced System Settings1

  1. Select the Advanced tab and Click the Environment variables

Advanced Tab

  1. Click the New  button in User variable

New User Variable

  1. Type PROE_INSTALL_PATH at Variable name
  2. Type Creo installation path at Variable value

Path may look like this

C:\PTC\Creo2-amd64-M180\Creo 2.0\Common Files\M120

TIPS:

Use DOS short path name for variable value to avoid some other windows path issues.

  1. Go to the Folder location where do you want short path name
  2. Press Shift+ Mouse Right Click Button
  3. Select Open Command Window here
  4. Type for %I in (.) do echo %~sI
  5. Copy the Short path Name from command prompt & paste this name in Environmental Variable value
Windows Short Path Name

How to get the windows short path name

 

The path may look like this

C:\PTC\CREO2-~3\CREO2~1.0\COMMON~1\M120

Edit User Variable

PRO_E_INSTALL_PATH

  1. Click OK to Complete the User variable
  2. Create one more user variable with the Name “PRO_COMM_MSG_EXE” and with the Value of pro_comm.exe location path. Path may look like this

C:\PTC\Creo2amd64M120\Creo2.0\Common Files\M120\x86e_win64\obj\pro_comm_msg.exe

  1. Follow the same procedure to create the System variable for both PROE_INSTALL_PATH and PRO_COMM_MSG_EXE
  2. Click OK

That’s all, Now you are ready to use VB API for Creo Automation

See more comments about this article from PTC Community

https://www.ptcusercommunity.com/thread/142126