[Closed] How to avoid pop-up during AI file import
How to avoid pop-up during AI file import
I use the below command to import AI file, but it comes with 2 pop-up window to chose 1.Merge Object & 2.Single/Multiple object
importFile “C:\Users\User\Downloads\Untitled-1.ai”
Please guide me to to fix this.
I want to import file using “importFile” with no pop-up.
Thanks
miauu Thanks for your reply.
#noPrompt will results with “Multiple object” witch I dont want , I want these two option by default selection 1.AI Import –> “Merge object with current scene” and 2. Import Shape as –> “Single Object”.
Thanks
importers settings are usually saved here:
C:\Users\User\AppData\Local\Autodesk\3dsmax\20%% – 64bit\ENU\en-US\plugcfg
otherwise look in this folder: getdir #plugcfg
then set them to preferred values like this:
setINISetting SettingsINI_path #LastUsedSettings #WeldThreshold "0.1"
upd
AI importer doesn’t use settings
try smth like this instead
fn OnAiImportDialog =
(
local hwnd = DialogMonitorOPS.GetWindowHandle()
local data = windows.getHWNDData hwnd
case data[5] of
(
"AI Import" :
(
local btn = windows.getChildHWND data[1] "&Merge objects with current scene."
windows.sendMessage btn[1] 0x102 0x20 0 -- send space char to the radio control
UIAccessor.PressButtonByName data[1] "OK"
)
"Shape Import" :
(
local btn = windows.getChildHWND data[1] "&Single Object"
windows.sendMessage btn[1] 0x102 0x20 0 -- send space char to the radio control
UIAccessor.PressButtonByName data[1] "OK"
)
default: UIAccessor.PressDefaultButton() -- press OK in all possible error message popup windows
)
true
)
dm_initial_state = DialogMonitorOPS.Enabled
DialogMonitorOPS.Enabled = true
DialogMonitorOPS.RegisterNotification OnAiImportDialog id:#ai_import_automation
importfile @"C:\Users\User\Downloads\example.ai"
DialogMonitorOPS.UnRegisterNotification id:#ai_import_automation
DialogMonitorOPS.Enabled = dm_initial_state
format "ai import complete...\n"