NO

Author Topic: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)  (Read 49578 times)

sergey

  • Guest
VeCAD & LiteCAD is free CAD-editor & SDK for programming on:
MS VisualBasic
vb.NET
C#
C++
Delphi (Pascal)

SDK has many examples - all OOP.

I program on C-lang a little (PellesC) and have decided to check up possibility to work in VeCAD (LiteCAD) SDK. Thus I at all don't know a C ++
Has to begin with selected BCX (Basic to a C translator).

BCX translated examples for compilation in LCC

I will be grateful to the one who will alter received C-code for compilation in the environment of PellesC IDE - at me it has not turned out.

My posts & examples (VeCAD & LiteCAD) on kolbasoft forum:
http://www.kolbasoft.com/forum/viewtopic.php?f=4&t=348

Links to download VeCAD (VeCAD   VeCAD DLL/OCX 6.0 Free Download   vecad6.zip   6.5 MB):
http://vecad-dll-ocx.soft32.com/
http://vecad-dll-ocx.soft32.com/get/file/id/512487?rel=center&s=wR_VlZP06h8hYJTXH84I_g&t=1356510749&ext=.zip&no_download_manager=true


http://vecad-dll-ocx.soft32.com/get/file/id/512487?iframe=true&width=420&height=200&no_download_manager=1&s=k4LuKMz3NDGUAK_D9K6Z1w&t=1356510957&ext=.zip&no_download_manager=true


Links to download LiteCAD:
http://www.kolbasoft.com/download.html
« Last Edit: December 29, 2012, 09:52:05 PM by Bitbeisser »

Offline DMac

  • Member
  • *
  • Posts: 272
Re: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)
« Reply #1 on: December 31, 2012, 06:21:42 PM »
Привет товарищ Климкин,
Я пересмотрел коды для LiteCAD API и адоптировал фаел Litecad.cpp работать в Pelles C.  Этот проэкт содержит новые фаелы Litecad.c, исправлен Litecad.h и демо. Демо должен успешно сделать образец чертежа.
Моя жена Виктория Викторовна и я поздравляем вас с Новым Годом!
Мы желаем вам всего самого наилучшего в этом 2013 году.

С уважением Давид МакДермот

I reviewed the LiteCAD API Code and adapted the LiteCad.c to work with Pelles C.   I also adapted an example for this demo.  It's not BCX but you can use this in a Pelles C project.

Happy new year!
No one cares how much you know,
until they know how much you care.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)
« Reply #2 on: December 31, 2012, 10:21:24 PM »
Happy New Year !!!!

Need LiteCAD.def ?
So here it is.
May the source be with you

sergey

  • Guest
English;
----------
Hello, David.

I congratulate you and your wife Victoria on Christmas!

Thanks for a congratulation both the fast and productive answer.

I too didn't sleep and have had time to rewrite the program in PellesC (VeCAD and LiteCAD).
Now I lead up it to working standards.

Thanks, timovjl

I hope that the subject of the free programming for xxxCAD on plain-C will be interesting not only me.

A little later I will lay out it in a working type for now I spread that is for today.

Important point for those who will want to look at operation of these programs:
1. for VeCAD it is necessary to have VeCAD.dll
2. for LiteCAD it is necessary to have LiteCAD.dll
3. I have shown links to them earlier.

P.S.:
*BAS-->BCX-->*.C-->LCC-->LiteCAD3.exe  - work from command-line & from menu.
*.c-->PellesC-->liteCADeditor.exe - work from command-line only, menu will work later.


Russuian (special for David):
-----------------------------------
Здравствуйте, Давид.

Поздравляю Вас и Вашу жену Викторию с Рождеством!

Спасибо за поздравление и быстрый и продуктивный ответ.

Я тоже не бездействовал и успел переписать программу в PellesC (VeCAD и LiteCAD).
Сейчас довожу ее до рабочих кондиций.

Спасибо, timovjl

Я надеюсь, что тема свободного программирования для xxxCAD on plain-C будет интересна не только мне.

Немного погодя выложу ее в рабочем виде , а пока выкладываю, то что есть на сегодняшний день.

Важный момент для тех, кто захочет посмотреть на работу этих программ:
1. для VeCAD необходимо иметь LiteCAD.dll
2. дя LiteCAD необходимо иметь LiteCAD.dll
3. ссылки на них я показал ранее.
« Last Edit: January 05, 2013, 12:58:46 AM by sergey »

sergey

  • Guest
English:
--------
LiteCAD IDE Editor.
It is the first working variant.
I upload the full project - for improvement.

Many thanks to David (DMac) for its timely help!

The project did in PellesC v.5.00 - it is convenient for me that it is possible to do also WinCE 4.2 and
WinMobile 5.0 programming.

Not all menu items working - some functions simply aren't registered. And it not the most important.
The authoring editor is much more interesting and more important not to repeat, and to create the
additional functions (and interfaces for them).
I think that it and there is a principal mission of this fine tool LiteCAD-API.


Russian:
--------
LiteCAD IDE Editor.
Это первый работающий вариант.
Выкладываю проект целиком - для усовершенствования.

Огромное спасибо Давиду за его своевременную помощь!

Проект делал в PellesC v.5.00 - он для меня удобен тем, что можно делать также WinCE 4.2 и WinMobile 5.0
программы.

Не все пункты меню работающие - некоторые функции просто не прописаны. И это не самое важное.
Гораздо интересней и важнее не повторять авторский редактор, а создать свои дополнительные функции (и
интерфейсы для них).
Я думаю что это и есть главное предназначение этого прекрасного инструмента LiteCAD-API.
« Last Edit: January 06, 2013, 09:56:30 AM by sergey »

sergey

  • Guest
David, I looked old messages at this forum and has been pleasantly surprised: there are you programmed
Applications for AutoCAD.

In this connection I have a question:
Probably-whether in a Pelles-C to make the program which will address to AutoCAD, to cause and fulfill
Its some functions?

In 2005 - 2007 I did programs for a building geodesy on VBA in AutoCAD, then on MS-VB6.
Read about that that some programmers successfully do programs for AutoCAD on Delphi.
There is tool MS-VC ++ ObjARX, at last is AutoLISP + DCL - but all it "from within" AutoCAD.
And here for Plain-C has found nothing.

Probably you had similar tasks, or you know such links?
« Last Edit: January 06, 2013, 09:59:50 AM by sergey »

Offline DMac

  • Member
  • *
  • Posts: 272
Sergy,

All the work I did for AutoCAD was in AutoLISP.  I havn't used AutoCAD in perhaps 10 years and I know that some things have probably changed since then.

No one cares how much you know,
until they know how much you care.

sergey

  • Guest
In development of the small project:
-----------------------------------
Has added in menu User Utils-> Strelka (new files userutils1.c and userutils1.h)
Thus has a little altered files main.c main.h resource.h main.rc

It while only preparation for the user subroutine by name "Strelka".
But it causes the dialogue with three buttons.
Button BUTTON3 causes reversal to function "New Text Object" from library LiteCAD.dll
There is a window of dialogue and the user can enter a line of the text.
This line then is located in the drawing.

Dialogue "Strelka" and its functions has made in such style which to me managed to be mastered in Pelles-C.
Probably it not the best style of creation of windows and dialogues, but me it is clear more others.

New functions in a file userutils1.c

LRESULT CALLBACK wnd_proc0(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);  // #0 [Strelka]
HWND create_wnd0(void);  // window #0
void create_wnd_content0(HWND parent);
void register_classes(void);  // register all the window classes

Now it is possible to add new windows-dialogues: wnd1, wnd2...

In principal function WinMain (has changed _tWinMain) has added:
   // SNK addition: user utils
   register_classes();
   strcpy(lf.lfFaceName, TEXT("Tahoma"));
    lf.lfHeight = -11;
    lf.lfWeight = FW_BOLD;
    lf.lfQuality = DEFAULT_QUALITY;
    h_font = CreateFontIndirect(&lf);

   // SNK addition: user utils
   create_wnd0();  // create window "Strelka"
   ShowWindow(hwnd0, SW_HIDE);  // and hide it at start of program

I don't know as to include cursor-separator COkDivider
Lines of type COkDivider:: m_hCurHorz =:: LoadCursor () this OOP
There can be somebody will prompt, as them to transform for Pelles-C ?

sergey

  • Guest
It is added:
1. A  windows divider-resizer (while only vertical), horizontal I can't make, but it and isn't so necessary;
2. The menu "User Utils", a dialogue window and 2 subroutines:
   "Text-draw" and "Strelka", the showing some base functions LiteCAD caused and executed in an interactive mode with use of a window "Command-string" (as it is accepted in many CAD-systems). "Strelka" requests from the user of 2 points, on them draws in the drawing a line, on the line ends puts these 2 points and nearest them text labels.

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
I don't know as to include cursor-separator COkDivider
Lines of type COkDivider:: m_hCurHorz =:: LoadCursor () this OOP
There can be somebody will prompt, as them to transform for Pelles-C ?

That is C++, so no luck with Pelles C.

See http://www.catch22.net/tuts/splitter-windows for a way to include a divider/splitter in plain ANSI C.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)
« Reply #10 on: January 13, 2013, 01:22:19 AM »
I don't know as to include cursor-separator COkDivider
Lines of type COkDivider:: m_hCurHorz =:: LoadCursor () this OOP
There can be somebody will prompt, as them to transform for Pelles-C ?

That is C++, so no luck with Pelles C.

See http://www.catch22.net/tuts/splitter-windows for a way to include a divider/splitter in plain ANSI C.

Actually Stephan ... the newest version of Easy Splitter, recommended on the Catch 22 site is in User Contributions on this site.... HERE 

sergey

  • Guest
Re: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)
« Reply #11 on: January 13, 2013, 01:33:33 AM »
Thanks for a prompt reply, Stefan.
Thanks for a prompt reply, CommonTater.

I read this pages (and still some other concerning to Pelles-C), but to my great regret have a little understood.
I not the programmer, and the geodesist who tries to use programming for the trade.
I write programs as a monkey: I will look at something and I try to apply to the problems.

Therefore: if somebody corrects a code of my program (so that were loaded and both cursors-dividers worked) I will be very grateful.
And the most interesting would be to alter a code of author LiteCAD for cursors from C ++ in pelles-C.

Once again thanks for attention to this theme.

CommonTater

  • Guest
Re: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)
« Reply #12 on: January 13, 2013, 02:40:41 AM »
The Easy Split library is very easy to use, you just move the splitter window in your WM_SIZE handler.

Pelles C does not support C++ and not all of C++ can be translated back to ANSI-C ... So you may have to get your hands on a C++ compiler such as MinGW or MSVC++
« Last Edit: January 13, 2013, 02:43:18 AM by CommonTater »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)
« Reply #13 on: January 13, 2013, 08:53:22 AM »
Actually Stephan ... the newest version of Easy Splitter, recommended on the Catch 22 site is in User Contributions on this site.... HERE

The top right hand corner of the Catch22 page allows downloading the old splitter source code and the new easy-splitter source code, so you will get the latest sources on both locations ;)



Sergey have you tried including the easy-splitter?
It is a ready to use extension, where you just use some functions to create and handle the splitter.

If you carefully check the source code, you should be able to implement it.
There is nothing that beats learning things on your own, if someone else does it for you it just doesn't stick as much.
« Last Edit: January 13, 2013, 08:57:23 AM by Stefan Pendl »
---
Stefan

Proud member of the UltraDefrag Development Team

sergey

  • Guest
Re: VeCAD (VectorCAD) & LiteCAD SDK for programming on BCX & C-lang (NOT OOP)
« Reply #14 on: January 13, 2013, 09:15:04 AM »
Thanks for reply, Stefan.

I have already included a divider in the program and it works.
But it ONLY one vertical divider.

The problem in including also a horizontal divider (as it is made at the author).
I don't understand as well as where competently to connect this second divider.

After all the divider is not so much icon with arrows, how many window Windows.
That is why I ask to look at a source code of my program and to correct it for the second divider.