I am creating an extension in which I am passing my website having components in HtmlDialog. In the HtmlDialog after few clicks, the component( DWG/3G) file gets downloaded. I want to handle this download file and open it directly in the SketchUp model. I know similar kinds of extensions have been developed in past. Could you please help me with a sample script to achieve this scenario? I am new to Ruby and SketchUp. How can I use action_callback to open the file in SketchUp.
# load the component into the model's definitions collection:
if File.extname(save_file) !~ /skp/i
comp_def = model.definitions.import(save_file)
comp_def = model.definitions.load(save_file)
Once in the model’s definitions collection either the user can use it manually from the Component inspector panel (ie, it will appear in the “In Model” collection via the house button) or: