[Solved] Creating curves in TopSolid Draft

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, jacs, Daniel

User avatar
olaio
Second Officer Cadet
Second Officer Cadet
Posts: 194
Joined: Thu Mar 01, 2007 11:42 am
Answers: 2
Location: Leiria

[Solved] Creating curves in TopSolid Draft

Unread post by olaio »

Hi,

I am trying to create curves using with an API.
I was well succeed in a TopSolid Design document :D , but in TopSolid Draft document i was not lucky :evil: . I recieved the following message: "Public member 'curves' on type 'IDocumentDraft' not found".
Can anyone help me to create curves (lines) in a TopSolid Draft document?

Thanks,
ptilu
Private
Private
Posts: 5
Joined: Mon Feb 26, 2007 4:17 pm
Location: French riviera

Unread post by ptilu »

Hi,

Not possible, API not complete. Only if a lot call support for this point ...
I'm waiting for sewing curves (Report TopSolid n° 569163) since 04/2006.
:evil:
Ptilu
Beco
Private First Class
Private First Class
Posts: 10
Joined: Mon Jul 02, 2007 11:50 am
Location: Yambol, Bulgaria
Contact:

Unread post by Beco »

You can use lip macro for everything, that is not directly possible with TopSolid API(v6.8).
C# :

Code: Select all

...
...
            TopApp.PushDoubleOnStack(0.0);   //z2  point2
            TopApp.PushDoubleOnStack(0.07);  //y2
            TopApp.PushDoubleOnStack(0.07);  //x2
            TopApp.PushDoubleOnStack(0.0);   //z1  point1
            TopApp.PushDoubleOnStack(0.2);   //y1
            TopApp.PushDoubleOnStack(0.15);  //x1
            TopApp.ExecuteMacroKeepStack(@"C:\Missler\Config\mylip\line2p.lob");
            Element line = (Element)TopApp.GetElementFromStack();
            TopApp.Synchronize();
...
...
line2p.lip :

Code: Select all

( Line by 2 points
STK IN  : 
POINT	p2
POINT	p1

STK OUT :
LABEL	line

REM :
)
CreateLine
; )
User avatar
olaio
Second Officer Cadet
Second Officer Cadet
Posts: 194
Joined: Thu Mar 01, 2007 11:42 am
Answers: 2
Location: Leiria

Unread post by olaio »

Hi Beco,

Only today i had the chance to test your sugestion.
Thanks for your help, that was exactly what i needed :D
User avatar
TopSolid2007
Master Chief
Master Chief
Posts: 133
Joined: Thu May 10, 2007 4:28 pm
Location: São Bernardo do Campo - SP
Contact:

Unread post by TopSolid2007 »

How can I run a C# code inside TopSolid?

I am anxiously looking for this answer...
User avatar
olaio
Second Officer Cadet
Second Officer Cadet
Posts: 194
Joined: Thu Mar 01, 2007 11:42 am
Answers: 2
Location: Leiria

Unread post by olaio »

Bom dia,

What we did was create a C# program.
After create a lip file calling the C# program:

________________________________

(
FUNCTION launch Exe

WHEN WHO WHAT
23/04/06 MJO creation

STK IN :
STK OUT :
)

"c:\misslerV68\config\api\ProgramC.exe " 0 CreateProcess

QuitMacro

________________________________

Then compile the lip file into a lob file.

Then create a line in TopSolid menu to call the lob file:

________________________________

#Men#Program_C {
"#Men#File#Folhas 2D" #0,11,0,1 = $TOPCONFIG/API/ProgramC ;

________________________________


Espero que tenha ajudado :lol:

Olaio
Holzknoten
Master Corporal
Master Corporal
Posts: 43
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17
Location: Hannover
Contact:

Unread post by Holzknoten »

Thx for the good tutorial, but...
can someone explain me where i can get the toplip.exe to generate a .lop file?

-----------------------------------------------------------------
ANSER:
in installing of TopSolid comes the part to choose the modules for install.

there is the Modul "TopLip" not marked to install.

i change this know. thanks for help @ olaio
Image
Last edited by Holzknoten on Fri Oct 14, 2011 4:19 pm, edited 2 times in total.
by Holzknoten
User avatar
olaio
Second Officer Cadet
Second Officer Cadet
Posts: 194
Joined: Thu Mar 01, 2007 11:42 am
Answers: 2
Location: Leiria

Unread post by olaio »

Hi,

You need to install the toplip aplication, when you are installing TopSolid.
The is an option (toplip) when you choose the modules to install.

Olaio
Post Reply