Author Topic: Open command..  (Read 4151 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Open command..
« on: April 11, 2005, 10:51:49 AM »
hi all

i have this code..

(command "_.open")


but not working..
why ? :cry:
Keep smile...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Open command..
« Reply #1 on: April 11, 2005, 10:57:47 AM »
Because SDI = 0.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Andrea

  • Water Moccasin
  • Posts: 2372
Open command..
« Reply #2 on: April 11, 2005, 11:17:11 AM »
Quote from: MP
Because SDI = 0.


heun !??

but don't want to change the SDI...
because i need to reset to 0 after...

how and why ??
Keep smile...

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Open command..
« Reply #3 on: April 11, 2005, 11:21:57 AM »
search for vbastmt

moving thread ...........
TheSwamp.org  (serving the CAD community since 2003)

Andrea

  • Water Moccasin
  • Posts: 2372
Open command..
« Reply #4 on: April 11, 2005, 02:39:28 PM »
Quote from: Mark Thomas
search for vbastmt

moving thread ...........


Thanks Mark,..
(moving the post here)    :lol:

but do i realy need to load VBA module just for the OPEN command ?

aloso,...i'm not very familar with the "vbastmt" function...
and i can't find any help in AutoCAD... :(

can any one give me a hint or some samples or any link to lurn about this function ??

thanks.
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Open command..
« Reply #5 on: April 11, 2005, 02:44:58 PM »
ok....

for now i have found this..

To open a drawing :

(command "vbastmt" (strcat "AcadApplication.Documents.Open "
(chr 34) filen (chr 34)))
;where filen is a qualified path and filename


but if i make  (setq filen (getfiled...blah blah blah..))
the open dialog box is not the same ...


 :evil:
Keep smile...

SMadsen

  • Guest
Open command..
« Reply #6 on: April 11, 2005, 02:54:50 PM »
Try something along the line of
Code: [Select]
(defun openMe (/ fn)
  (if (setq fn (getfiled "Open drawing" "" "dwg" 8))
    (command "VBASTMT"
             (strcat "AutoCAD.Application.Documents.Open(\"" fn "\")")
    )
  )
)

Andrea

  • Water Moccasin
  • Posts: 2372
Open command..
« Reply #7 on: April 11, 2005, 03:25:35 PM »
Quote from: SMadsen
Try something along the line of
Code: [Select]
(defun openMe (/ fn)
  (if (setq fn (getfiled "Open drawing" "" "dwg" 8))
    (command "VBASTMT"
             (strcat "AutoCAD.Application.Documents.Open(\"" fn "\")")
    )
  )
)


heun !!??
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Open command..
« Reply #8 on: April 14, 2005, 10:49:26 AM »
Sorry all..

But I can't find a way to obtain the same dialog box when opening a drawing... :cry:

i'm lost... :roll:
Keep smile...

SMadsen

  • Guest
Open command..
« Reply #9 on: April 14, 2005, 10:53:06 AM »
Same dialog box as what?

daron

  • Guest
Open command..
« Reply #10 on: April 14, 2005, 11:33:13 AM »
The standard one that opens normally, when you type open, with all the bells and whistles.