• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

autocade release detection

  • Thread starter Thread starter dadinux
  • Start date Start date

dadinux

Guest
Good morning.

I tried to search in the forum with different keys but I'm just subject I can't find it.

I will try to be as clear as possible:

I am doing an application on access that I interface a db with typical autocad designs.

1) I must open autocad (from vba) indicating obviously the release
2) I have to save the typical after processing it by associating it to the db record, saving it in dwg.

My problem is that I don't know, I don't have a table, I don't find it on the internet (or better, I don't find consistency between the info I find on the internet) that I associate the version of autocad (ex autocad 2000) with a numerical code (which is then what I have to enter into the vba.

Can someone give me a definitive answer to the dilemma?

Thank you.
 
perfect, however (mea culpa) I failed to say that the program is not always used on my pc, but it needs to be able to "plasm" on other office machines and not, in which not always the release of autocad is the same.
I then created a small interface that allows me to select the installed release and the release in which the file will be saved.. .
the fact is that I need to know which code to use based on the release in question. . .
Yesterday I noticed that according to the code entered during the rescue, I varies not only the release but also the file format.. .

Thank you. .
 
Yeah, well, except for the 2007 release, but... It doesn't give me any indication on the code to enter. . .
I searched the forum and found nothing to give me a list of the codes.
I can't question the wks every time the program passes from one pc to another.
I was looking for a list that tells me which codes to insert to save and which to open.
in the internet, there are discordant values.
 
1) devo aprire autocad (da vba) ovviamente indicando
in each you can try to use the procedure without indicating the version of autocad to open I tried and it works

in the form
public function connect() as boolean
dim acadrunning as boolean
on error goto err_control
acadrunning = isautocadopen()
if acadrunning then
set acad = getobject(, "autocad.application")
else
set acad = createobject("autocad.application")
end if
acad.visible = true
'set thisdrawing = objacad.activedocument
connect = true
exit_here:
exit function
err_control:
msgbox err.description
resume exit_here
end function


function isautocadopen() as boolean
on error resume next
set acad = getobject(, "autocad.application")
isautocadopen = (err.number = 0)
set acad = nothing
err.clear
end function
in the event
public acad as object
private sub commandbutton1_click()
dim stringa as string
stringa = ""
call connect
set acad = getobject(, "autocad.application")
set thisdrawing = acad.activedocument
acad.visible = true
end sub
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top