-Attext and dialogbox
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
-Attext and dialogbox

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Daniel Aldridge
Guest





Posted: Mon Dec 20, 2004 10:49 pm    Post subject: -Attext and dialogbox Reply with quote

Hello,

I am trying to execute the "-Attext" command, via
ThisDrawing.SendCommand ("-ATTEXT" & vbCr & "SDF" & _ vbCr & "TemplateFile.TXT" & vbCr & "OutPutFile.TXT" _
& vbCr & "Y" )

The problem is that whenever I execute the code, a dialogbox pops up to request the Template file and the out put file. How do I supress the dialogbox and just have vba enter in the commands...
I would have sworn there was some sort of code to receive input values for the AutoCAD command line.
thanks,
Daniel

Back to top
Daniel Aldridge
Guest





Posted: Tue Dec 21, 2004 12:37 am    Post subject: Re: -Attext and dialogbox Reply with quote

Solution:

The "-" character before the "Attext" command tells autocad to supress the dialog box. For some reason this does not work. One option that I have come across is to set "FileDia" to 0. In other words, issue this command before the "-Attext" command:
.Sendcommand("FileDia" & vbcr & "0" & vbcr)
Back to top
krispy
Guest





Posted: Tue Dec 21, 2004 4:18 am    Post subject: Re: -Attext and dialogbox Reply with quote

instead of using sendcommand to set a system variable use setvariable... for eg:
ThisDrawing.SetVariable "FILEDIA", 0

Back to top
Mike Tuersley
Guest





Posted: Wed Dec 22, 2004 10:50 am    Post subject: Re: -Attext and dialogbox Reply with quote

Quote:
The "-" character before the "Attext" command tells autocad to supress the dialog box. For some reason this does not work.
That only works from the actual command line, not through code unless you

issue the FILEDIA first.

Quote:
One option that I have come across is to set "FileDia" to 0. In other words, issue this command before the "-Attext" command:
.Sendcommand("FileDia" & vbcr & "0" & vbcr)
Never use the sendcommand unless you absolutely have to! In this case use

SetVariable("FILEDIA", 0)

-- Mike
___________________________
Mike Tuersley
CADalyst's CAD Clinic
Rand IMAGINiT Technologies
___________________________
the trick is to realize that there is no spoon...
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB