News:

Please note new Forum URL: forum.designcad.com

Main Menu

Help with BasicCad

Started by j-wetzel, February 15, 2008, 11:56:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

j-wetzel

(Running DesignCad 3d max 18.1 on new Lenova ThinkPad with oceans of ram.)

I need BasicCad so seldom that I can't remember how to write it correctly from one year to the next.  In particular, can one of you sharp-eyed folks tell me why the following truly elementary program refuses to function?  It says "missing parameter block for >pointxyz [x,y,0].




'This macro draws the lower elliptic arc.
x = -0.04
pi=3.14159265359
q=(1/pi)*(2+sqrt(pi*pi-4))
  >curve
   {
     do while x < 2.85     
       If 1-(q-x)*(q-x) > 0 then
         y = 0.25*(q-x-sqrt(1-(q-x)*(q-x)))
         >pointxyz [x,y,0]
           {
              }
       Endif
     x = x + 1/10
     loop     
     }
End




Thanks for any and all help and comments.

--Jack

--Jack

Rob S



The pointxyz does not need a parameter block, and its arrow points the other way.

Try this

'This macro draws the lower elliptic arc.
x = -0.04
pi=3.14159265359
q=(1/pi)*(2+sqrt(pi*pi-4))
  >curve
   {
     do while x < 2.85     
       If 1-(q-x)*(q-x) > 0 then
         y = 0.25*(q-x-sqrt(1-(q-x)*(q-x)))
         <pointxyz [x,y,0]
      Endif
     x = x + 1/10
     loop     
     }
End
User since forever

j-wetzel

Thanks, Mr. Schippers, for catching that error.  Unfortunately, with the arrow pointing correctly and the "{ }" removed, the compiler reports an error in line five:  >curve

It gives no hint whatsoever what that error might be.

I have no problem plotting this curve in MacKichan's wonderful LaTeX front-end, Scientific Workplace, so I know the formula I'm trying to plot is correct.  But DesignCAD seems to choke on it.  Maybe I'm just getting too old for this game.

Any further suggestions?

--Jack
 
--Jack

Rob S

#3
I cut and pasted the macro back to my notepad from my post above, saved it as curve2.d3m, and it runs fine for me in both V17.2 and V18.1

I wonder if you lost something else in the translation??
User since forever

j-wetzel

Good grief gravy.  I did precisely what you said worked for you, and the same thing happened as before:  error on line 5, >curve.

Maybe something is wrong with my installation of 18.1?  Should I reset, reinstall, or maybe pray over it?

This is weird!

--Jack
--Jack

edgar

Maybe if you attach your file here to a reply some of us can try running exactly what you have.
-Ed

j-wetzel

The suggestion of attaching the files in the hope that someone with higher IQ than mine can spot the problem is an excellent one.  Here they are, if I can figure out how to attach files to this posting.  Ah, I see.

This is a one-shot drawing.  I'm not trying to create a tool to use in the future.

The macro is e.d3m.  The drawing (to date) is final.dcd.  The remaining attachment, work3.pdf, is a plot of the complete ellipse done by a different program (Scientific WorkPlace).  I am interested in just the lower half.

When I try to run e.d3m in final.dcd, I get an error message saying that there is an error in line 5, viz., >curve.

Help!

And thanks!

--Jack
--Jack

Lar

#7
I ran your latest macro in final.dcd (v17.2) with no problem except that it did not draw the complete solid part of the ellipse as shown in the pdf file.

Maybe you previously changed the name of the Curve command in one of dcad's ini files.

Lar

Rob S

With apologies to Lar, who was quicker, I did the same in V18.1 downloaded your macro, opened your file in V18, ran your macro, and got the following results, same as above.

If you type spacebar, and enter the command "curve" without the quotes, does the curve command open for you, ready to set points??
User since forever

edgar

I also tried in 18.1 and seem to get what Rob and Lar get:

-Ed

j-wetzel

#10
I'm afraid Mr. Schippers found the key when he asked me to check "curve" using the command line.  When I hit the space bar and type "curve" (without the quotes), absolutely nothing happens.  The command window closes, that's all.

Does this mean I need to reinstall the accursed program?  Or what?

Thanks for all your help, folks.  I am very grateful.

Oh, I meant to report that my ThinkPad is running MS Vista (Business).  Could this be yet another Vista incompatibility?
--Jack

j-wetzel

Well, that's your basic bummer!  I moved everything to my old ThinkPad running MS XP, and everything worked for me just as you all said it worked for you. 

So the problem really is a Vista (or maybe a Vista Business) incompatibility.  I guess I have two choices now:  (1) move the whole project back to the older machine, or (2) run DesignCAD in MS XP Compatibility mode (assuming that is possible).

Bah, humbug.

--Jack

Lar

j, in your Documents and Settings folder there should be a DesignCAD 18 folder. Open the parent folder and see if you have these files: cmdlist.ini, custom.ini, Dc3MaxCmd.ini and Macrocmd.ini. If all are there open each one in Notepad and use the Edit> Find... comand to find the word 'curve'. There should be a few curves, like 'Bezier Curve' and 'Line to Curve' but mainly see if you have ID_CURVE=10026 in Dc3MaxCmd.ini and Curve=ID_CURVE in Macrocmd.ini. This file should not be edited, by the way, so if it isn't there you should report it to the developers and maybe one of can send you the proper file(s), if that's ok with the developers.

Lar

j-wetzel

Lar, the files you list are there, just where you said they should be.  The only other item of news about this mess is that I changed the properties so that DesignCAD 3D Max runs in "Windows XP Service Pack 2" compatibility mode.  With great expectations, I gave it a try; but, alas, the problem remains unchanged; running the macro gives the same error as before, and trying to draw a curve using the command line fails.

I understand there is a way to step the Vista operating system back to MS XP (Service Pack 2).  Maybe that is what I should do.

Thanks to all of you your attempts to help.  In the meantime, I'm going to move the entire project back to my old ThinkPad and do it there -- but it's a nuisance to switch back and forth.

Thanks again to all.

--Jack

edgar

I cannot imagine how Vista can be the culpret here (elsewhere, I know it has it's issues  :) ). I would reinstall 18.1 on the Vista machine and try the macro again. BTW, is it 32-bit or 64-bit? Otherwise, how is Vista doing with DCad? Especially, any refresh issues (constanly having to refresh the screen because the main window goes all white?)
-Ed