App gives Exception Name Error

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

App gives Exception Name Error

Post by keithsloan52 »

I have a python procedure that has the following coded.

v=App.Vector(x,y,z)
nodes.append(v)

And at run time I get Runline 211, in processB
v=App.Vector(x,y,z)
<type 'exceptions.NameError'>: global name 'App' is not defined

What did I miss. ( I promise to drink more coffee in the future)
Did I forget to import or global something

OS: Ubuntu 14.04.5 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6703 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 2ce5c8d2e3020d05005ed71f710e09e9aa561f40
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: App gives Exception Name Error

Post by wmayer »

Code: Select all

import FreeCAD as App
Post Reply