Script editing / recording

Discussion of MicroSurvey CAD related issues and questions.

Moderators: Brian Sloman, Jason Poitras, James Johnston

Script editing / recording

Postby Hydromel » Thu Jun 22, 2006 3:51 am

Hi, I'm currently working on a project of linking an MsAccess database with MsCad. So far, the whole MsAccess thing is ok. I generate .csv files that are coma separated and without " " for delimiting text. I'm working on a script that could automatically import c:\temp\temp.csv to qsb database in a new file in mscad. The problem is when I record a script in mscad2005, I check the .scr file with notepad and I notice that only
_new
_tog
_endofscript
commands are written...
and so far even if i add _ascii_in there's a wizard that appear (if only wiz could be turned off :evil: )... I would be very satisfied if it could automatically import "c:\temp\temp.csv"

At first I tought that it was only because I didn't save the file (for qsb database) but it does the samething if I command to open a file like "c:\temp\template.dwg"

The main purpose of the script would be let users export data in MsAccess database and actually see it in a file as Xref attachement.

I already set my user experience level to "Advanced" and didn't change anything.

Thanks
Hydromel
 
Posts: 15
Joined: Thu Jun 22, 2006 3:39 am

Postby Hydromel » Thu Jun 22, 2006 4:44 am

...[continued]

The current MsAccess database contain Survey & Lab analysis datas.
I would like to know if it's possible to create an automated process in mscad that would check a point description and check if it's between 0 and .5 and give the point a red color... if between .5 and 1 then blue... and so on ...

Thanks
Hydromel
 
Posts: 15
Joined: Thu Jun 22, 2006 3:39 am

Postby Glen Cameron » Thu Jun 22, 2006 5:20 am

The dialog boxes are hard coded for most of the survey related commands.

Have you tried setting the variable FILEDIA to OFF for the rest of the cad related dialogs to not be shown?

Also, if you are attempting to read in a point file to go directly to a surface in memory, have you tried the commands, MsModelling menu -> Import Data -> Read ASCII Points/ Read ASCII Table. They do not add the points to the drawing, just the surface. You could then save the QSB file directly and never have the points int he current drawing. If you want to draw the points, they can be drawn as CAD points under the MsModelling menu.

I am not so sure that a script will will do everything you want in this case.

Cheers,
Glen W. Cameron, C.E.T.
City of North Bay, Ontario
Glen Cameron
 
Posts: 1395
Joined: Fri Nov 08, 2002 12:18 pm
Location: Corbeil, Ontario, Canada

Postby Glen Cameron » Thu Jun 22, 2006 5:50 am

For the point description question (sorry I missed it last time I went through the postings), the only tool we have is AutoMAP to examine descriptions and then do something with the point based upon the description. It does not look at ranges, it uses exact matches, so I don't think it will help you here.

If the elevation value (even if it is not an elevation, any value in the elevation field can be used) is to be used to create a surface, the TIN, Grid, or Tgrid can be drawn using the color ranges. The points however, do not follow this option.

Cheers,
Glen W. Cameron, C.E.T.
City of North Bay, Ontario
Glen Cameron
 
Posts: 1395
Joined: Fri Nov 08, 2002 12:18 pm
Location: Corbeil, Ontario, Canada

Postby Hydromel » Thu Jun 22, 2006 6:13 am

Well, AutoMAP would be ok, I could export my data with fixed descriptions.. MsAccess would check for the range and get a specific value. If AutoMAP can give colors to num values or text strings as description that would defenatly do what I want.
Hydromel
 
Posts: 15
Joined: Thu Jun 22, 2006 3:39 am

Postby Glen Cameron » Thu Jun 22, 2006 6:37 am

The colors would be controlled by the layer the points would be placed on.

Cheers,
Glen W. Cameron, C.E.T.
City of North Bay, Ontario
Glen Cameron
 
Posts: 1395
Joined: Fri Nov 08, 2002 12:18 pm
Location: Corbeil, Ontario, Canada

Postby Hydromel » Mon Jun 26, 2006 9:00 am

The Automap Library did exactly what I wanted, thanks ! :D
Still the only problem is to automate via script the "MsPoint -> Import ASCII Points or Lats Long file" command to get the coma delimited txt file c:\temp\temp.csv .
Hydromel
 
Posts: 15
Joined: Thu Jun 22, 2006 3:39 am

Postby Glen Cameron » Mon Jun 26, 2006 11:11 am

Unfortunately for what you want, we can not do it. The dialog box is hard coded and there is no non-dialog command to do the same thing.

Cheers,
Glen W. Cameron, C.E.T.
City of North Bay, Ontario
Glen Cameron
 
Posts: 1395
Joined: Fri Nov 08, 2002 12:18 pm
Location: Corbeil, Ontario, Canada

Postby Hydromel » Wed Jun 28, 2006 4:00 am

Hi ! Is there a way to start a .scr script file when launching mscad2005.exe from dos command prompt ?

ie : " mscad2005 -script c:\script.scr "

Thanks
Hydromel
 
Posts: 15
Joined: Thu Jun 22, 2006 3:39 am

Postby Glen Cameron » Wed Jun 28, 2006 4:31 am

Looking at the Using IntelliCAD (A Reference and Source Guide for IntelliCAD) manual, they do not show an option to do this. They indicate the way to start the program is by running the shortcut from the desktop or the windows start menu. They do not show any options to start the program via a DOS type entry.

Cheers,
Glen W. Cameron, C.E.T.
City of North Bay, Ontario
Glen Cameron
 
Posts: 1395
Joined: Fri Nov 08, 2002 12:18 pm
Location: Corbeil, Ontario, Canada

Postby Hydromel » Wed Jun 28, 2006 6:08 am

thanks for your help :D
Hydromel
 
Posts: 15
Joined: Thu Jun 22, 2006 3:39 am

Postby Brian Sloman » Wed Jun 28, 2006 11:56 am

This isn't quite what you were asking for, but may work for what you need. You can load a script using the following lisp command, which can be put in the icad.lsp file to automatically run the script when a drawing is opened or created.

(command "script" "yourscriptfile.scr")
User avatar
Brian Sloman
Product Manager
 
Posts: 399
Joined: Fri Jan 07, 2005 4:42 pm
Location: Westbank, BC, Canada


Return to MicroSurvey CAD

Who is online

Users browsing this forum: No registered users and 1 guest

cron