How to Import an Autocad file using Google Sketchup

Опубликовано: 13 Май 2026
на канале: UbisenseSupport
367,033
356

This video show you how to import an Autocad file into Site Manager using a simple plugin for Google Sketchup. This simple tool will allow you to quickly create an area rather than doing it by hand. Copy the code below into notepad and save as ExportWalls.rb. See notes at the bottom.

require "sketchup.rb"
module CD
def self.export_points
model = Sketchup.active_model
ents = model.active_entities
path = UI.openpanel()
if not path then return end
aFile = File.open(path, "w")

ents.each{
|e|
if e.is_a?(Sketchup::Edge)
sp = e.start #starting point of the line
ep = e.end #ending point of the line
x1 = sp.position.x
y1 = sp.position.y
x2 = ep.position.x
y2 = ep.position.y
aFile.puts(x1.to_s().chop + " " + y1.to_s().chop)
aFile.puts(x2.to_s().chop + " " + y2.to_s().chop)
aFile.puts(" ")
end
}

aFile.close()
UI.messagebox('Script Complete')
end # CD.export_points
end # MODULE
filename = File.basename(__FILE__)
if not file_loaded?(filename)
UI.menu("Plugins").add_item("ExportWalls") {CD.export_points}
file_loaded(filename)
end

NOTE: Use at least 3 digits of precision when converting your file. Your pc must be in English locale and the decimal symbol must be set to "."