News:

Please note new Forum URL: forum.designcad.com

Main Menu

File Properties Addition

Started by Robert Willis, January 07, 2007, 09:20:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Robert Willis

I would like to see DesignCAD add a File Properties option so that additional information could be saved with the drawing such as the Project Name, Designer, Revision Number and Revision Number to name a few. I have this capability in Microsoft Office and would like to have the same with DesignCAD. It would also be nice if this inforamtion could be retreived via the SYS objects.

Bob P

In my DOS days (which I've never left...), I wrote a basiccad program that creates a separate file with the same file name but a different extension.  Maybe someone is ambitious enough to convert it to d3m format.  I also have a program to show the file in a DC window.

'CD.BSC
'This program records a file's description by prompting the user for
'one.  If there are points set on text, it will record the text to a file.
'The file will be stored with the same name and directory as the drawing,
'but with the extension .DS2.
'If the drawing is not already saved, it will prompt for a name and save the
'drawing first.
'If the file already exists, you can add to the file too.  Editing will require a separate editor.


IF SYS$(2)="" THEN GOTO NONAME
COMENT:
F1$ = SYS$(2)+".DS2"
'2: Check to see if the file already exists
IF EXIST(F1$)=0 THEN GOTO NEW

TRY:
PRINT "The description already exists!  Replace, Add to or eXit? (R/A/X) "
ANYKEY ANS$
IF ANS$="R" OR ANS$="r" THEN GOTO NEW
IF ANS$="X" OR ANS$="x" THEN GOTO END
IF ANS$="A" OR ANS$="a" THEN GOTO APEND
GOTO TRY

APEND:

OPEN "A", 1, F1$
IF SYS(1)>0 THEN GOTO APENDP
INPUT "Add to the current description: " A$
DO WHILE A$ <> ""
  FPRINT A$
  INPUT "Description: " A$
  LOOP

APENDP:
N=SYS(1)
DIM XP(N), YP(N), ZP(N)
FOR J=1 TO N
POINTVAL XP(J) YP(J) ZP(J) J
NEXT J
SYS(1)=0

FOR J=1 TO N
>POINTXYZ [XP(J), YP(J), ZP(J)]
>GETENTITY
A$=SYS$(1)
SYS(1)=0
PRINT #1, A$
NEXT J

CLOSE
GOTO END

NEW:
OPEN "O", 1, F1$
IF SYS(1)>0 THEN GOTO GETT

INPUT "Describe the drawing in detail: " A$
DO WHILE A$ <> ""
  FPRINT A$
  INPUT "Description: " A$
  LOOP

CLOSE
GOTO END

NONAME:
WINDOW 3,20
LOCATE 2,2
PRINT "Your file must have a name first! "
>SAVE
WCLOSE
GOTO COMENT

GETT:
N=SYS(1)
DIM XP(N), YP(N), ZP(N)
FOR J=1 TO N
POINTVAL XP(J) YP(J) ZP(J) J
NEXT J
SYS(1)=0

FOR J=1 TO N
>POINTXYZ [XP(J), YP(J), ZP(J)]
>GETENTITY
A$=SYS$(1)
SYS(1)=0
PRINT #1, A$
NEXT J


END:

PaulWatson

Quote from: Robert Willis on January 07, 2007, 09:20:52 PM
I would like to see DesignCAD add a File Properties option so that additional information could be saved with the drawing such as the Project Name, Designer, Revision Number and Revision Number to name a few. I have this capability in Microsoft Office and would like to have the same with DesignCAD. It would also be nice if this inforamtion could be retreived via the SYS objects.

I do something like this programatically using DSO. This can only be done with OLE Automation not BasicCAD.
http://forums.upperspace.com/topic.asp?TOPIC_ID=3570
http://forums.upperspace.com/topic.asp?TOPIC_ID=4305
http://forums.upperspace.com/topic.asp?TOPIC_ID=4195

Droll Troll had something bubbling away on the back boiler. This concept should make it fairly easy for non-programmers to add user specific information to a DesignCAD document. DT has been very busy with other things, so I don't know when and if this will actually happen.
http://forums.upperspace.com/topic.asp?TOPIC_ID=4256