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

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