Welcome
Expand Getting StartedGetting Started
Expand SOLIDWORKS API HelpSOLIDWORKS API Help
Expand SOLIDWORKS Electrical API HelpSOLIDWORKS Electrical API Help
Expand SOLIDWORKS PDM Professional API HelpSOLIDWORKS PDM Professional API Help
Expand FeatureWorks API HelpFeatureWorks API Help
Expand SOLIDWORKS Costing API HelpSOLIDWORKS Costing API Help
Expand SOLIDWORKS Document Manager API HelpSOLIDWORKS Document Manager API Help
Expand SOLIDWORKS Routing API HelpSOLIDWORKS Routing API Help
Expand SOLIDWORKS Simulation API HelpSOLIDWORKS Simulation API Help
Expand SOLIDWORKS Sustainability API HelpSOLIDWORKS Sustainability API Help
Expand SOLIDWORKS Toolbox API HelpSOLIDWORKS Toolbox API Help
Expand SOLIDWORKS Utilities API HelpSOLIDWORKS Utilities API Help
Expand eDrawings API HelpeDrawings API Help
Expand DraftSight API HelpDraftSight API Help
Expand Lisp Programming BasicsLisp Programming Basics
Expand Lisp Functions OverviewLisp Functions Overview
Collapse Lisp Functions ReferenceLisp Functions Reference
Lisp Functions by Alphabetical Order
*error*
*settrace*
+ (Addition)
- (Subtraction)
* (Multiplication)
/ (Division)
1+ (Increment)
1- (Decrement)
Equal
Not equal
Greater than
Greater than or equal
Less than
Less than or equal
~ (Bitwise NOT)
abs
acad_colordlg
acad_strlsort
actcmd
action_tile
add_list
ai_deselect
ai_draworder
ai_viewports_alert
alert
alloc
and
angle
angtof
angtos
append
apply
ascii
assoc
atan
atof
atoi
atom
atoms-family
boole
boundp
car
caaaar ... cddddr
cdr
chr
cleartextscr
client_data_tile
close
command
cond
cons
cos
cvunit
defun
delcmd
dictadd
dictnext
dictremove
dictrename
dictsearch
dimx_tile
dimy_tile
distance
distof
done_dialog
end_image
end_list
entcheck
entdel
entget
entlast
entmake
entmakex
entmod
entnext
entpos
entsel
entupd
eq
equal
eval
exit
exp
expand
expt
fill_image
findfile
fix
float
foreach
gc
gcd
get_attr
get_tile
getactvport
getangle
getcfg
getcname
getcolorindex
getcorner
getdist
getenv
getfiled
getininame
getint
getkword
getorient
getpoint
getprofileslist
getreal
getstring
getvar
graphscr
grclear
grdraw
grread
grtext
grvecs
handent
help
if
iinitdia
initget
inters
itoa
lambda
last
length
list
listp
load
load_dialog
log
logand
logior
lsh
mapcar
max
mem
member
menucmd
menugroup
min
minusp
mode_tile
namedobjdict
nentsel
nentselp
new_dialog
not
nth
null
numberp
open
or
osnap
pi (Constant)
polar
prin1
princ
print
progn
prompt
quit
quote
read
read-char
read-line
redraw
regapp
rem
remdelall
remove
removeall
repeat
reverse
rtos
set
set_tile
setactvport
setcfg
setenv
setfunhelp
setpreselect
setq
setvar
setview
sin
slide_image
snvalid
sqrt
ssadd
ssdbno
ssdel
ssget
ssgetfirst
sslength
ssmemb
ssname
sssetfirst
start_dialog
start_image
start_list
startapp
strcase
strcat
strlen
stringsort
subst
substr
symbtos
tan
tbldel
tblmake
tblmod
tblnext
tblobjname
tblpurge
tblrename
tblsearch
tblset
term_dialog
terpri
textbox
textpage
textscr
trace
trans
type
unload_dialog
untrace
vector_image
ver
vmon
vports
wcmatch
while
write-char
write-line
xdroom
xdsize
zerop
Expand Visual Lisp Compatible FunctionsVisual Lisp Compatible Functions
Hide Table of Contents

gcd

(gcd number1 number2)

The gcd function returns the greatest common denominator of the given numbers.

Examples

: (gcd 20 50)

10

: (gcd 33 47)

1



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Function gcd
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:




x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2021 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.