CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 06-25-2010, 08:36 AM
Glider Glider is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
Informations about Cocreate API and customization in general

Hi all,

this is my first message in this forum.
Please excuse me for my bad English.
I'm evaluating the introduction of a 3D CAD in my company.
We are comparing the various solutions and one my priorities is the possibility of writing some customization to automate some ripetitive tasks.
At the moment we reduced the choice to Solidworks and Cocreate.
The main need is to project molds, dies and tools for fasteners, obtained by wire cold forming processes.
Since we produce a lot of special parts, every time we get an order we need to make a project, develop the process cycle, drawing the dies and tools.
I didn't find on the market a solution for this task (something similar to Solidworks' Logopress3 for sheet metal but dedicated to wire) and since I already wrote in the past a software to make some of the needed calculations, I' trying to understand if is possible to customize Cocreate for my needs and find a way to let my software to interact with Cocreate.
I already asked about API, LISP, customization to sales and technical guys of a local reseller, but when I spoke with them about these arguments, they were not able to answer.

My idea is to draw the part in 3D (for example a screw), get the volume of the whole screws or of some specific sections and trandform a complex shape in a simpler one keeping a constant volume.
To make an extreme semplification, if I draw two cylinders joined by a truncaded cone, I'd like to get the volume of this shape and calculate the lenght of a cylinder of a given diameter with the same volume of the starting part.
Then the CAD should draw by itself the cylinder.
Obvioulsy my process is more complicated, but at the end it is a sequence of this kind of calculations.
After I draw the different cold forming steps , I need to draw the dies and mold components, which for 80% of cases arise from well defined shapes and geometry.
These are time consuming and repetitive tasks, prone to stupid errors during calculations.

My main goal is to recycle my software written in Object Pascal (Delphi) and interface it with Cocreate through COM, to manipulate parts, geometry and drawing inside Cocreate.

So my questions are:

1) From what I read in this forum and in Claus Brod web site, it seems possible to implement my idea in LISP, but I'd like to know before paying the licence

2) Reading Cocreate API help files, it seems that through the API is not possible to reach the same level of LISP interaction with Cocreate enviroment, user interface and parts geometry.
Since in Cocreate there isn't an integrated development environment like Solidworks or Solidedge VBA and since I don't know LISP, it will be a nightmare to implement, develop and debug my algorithms in an unknown language with a simple text editor.
Is possible to customize and interact with Cocreate through API and COM with the same level of integration assured by internal LISP?

3)In the COM.NetApiReadme.pdf file found in Cocreate help directory I found this statement:
'While we will accept specific API defect reports we are not actively enhancing the CoCreate Modeling COM/.NET API.'
In the first page of CoCreate.OsdmObjects.chm help file I found this:
'Support for external .NET clients is planned for future versions of the API.'
Which one is right?

Thank you in advance for your replies.
Reply With Quote
  #2  
Old 06-25-2010, 08:59 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: Informations about Cocreate API and customization in general

In your scenario, you will likely end up using a combination of Lisp and CoCreate Modeling's .NET API.

Using the .NET API, you can interface and control your existing external code. Also, you can inquire all structural, geometrical and topological data about the model.

If I understood the scenario correctly, once you've analysed the model in your external code, you want to either modify the existing model or add a new one. Since the .NET API currently does not provide functionality to create or modify model components, you'll have to implement this part of the task using the Integration Kit (and Lisp).

From your description, however, I'm pretty confident that you'll be able to accomplish your goal using CoCreate Modeling and the existing APIs.

Hope this helps,

Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #3  
Old 06-25-2010, 09:52 AM
mrstero mrstero is offline
Registered User
 
Join Date: Dec 2009
Posts: 61
Re: Informations about Cocreate API and customization in general

solidworks and cocreate have their comparative strengths and weaknesses, but I have looked into this matter and find that the solidworks API is very appealing in a variety of areas:

-lots of documentation, both in depth and breadth
-there is a dedicated set of people @ solidworks corporate who take support calls. While the tech support I get from CoCreate is excellent in the areas that they cover, they don't seem to be staffed to provide API help
- buillt from the ground up to integrate with visual studio IDE / choose your language vb.net or C#
- because solidworks is history-based, you can manipulate features, etc. I don't know how you would
- I'm not going to trash the merits of LISP, but most of the programming you will need to do with cocreate will involve LISP, do you really want to invest time in learning LISP vs. a more in-demand language? (Java, VB.NET, C#)
Reply With Quote
  #4  
Old 06-25-2010, 10:25 AM
MichaelA MichaelA is offline
Registered User
 
Join Date: Feb 2006
Location: Vancouver, WA USA
Posts: 40
Re: Informations about Cocreate API and customization in general

I agree with Claus, I don't see anything that you want to do that you can't do within Cocreate Modeling without needing any outside API. There are a number of complex LISP functions in existance (on this forum or at http://osd.cad.de/index.en.htm) that could be leveraged to help you in your coding. Also there are a number of people that can do the LISP coding for you on a time & material basis thru PTC and outside contractors as well (myself included).

I'm an old time Cocreate user and love the lack of history but know others that love the history stuff from Solidworks. I guess it depends upon your preferences, each have advantages. Pick the tool that best meets your company needs and then tweak it to match your particular needs.
Reply With Quote
  #5  
Old 06-25-2010, 12:42 PM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: Informations about Cocreate API and customization in general

Quote:
Originally Posted by mrstero View Post
- I'm not going to trash the merits of LISP, but most of the programming you will need to do with cocreate will involve LISP, do you really want to invest time in learning LISP vs. a more in-demand language? (Java, VB.NET, C#)
That is why the .NET API for CoCreate Modeling came into existence, as it allows partners and customers to use their preferred programming language and tools. You can use both "native" languages as well as languages which produce code for the CLR.
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #6  
Old 06-25-2010, 12:58 PM
mrstero mrstero is offline
Registered User
 
Join Date: Dec 2009
Posts: 61
Re: Informations about Cocreate API and customization in general

sure, I don't disagree with you. But, I've looked at the .NET API that cocreate offers and it is nowhere near as comprehensive as the corresponding solidworks API.

I'm not criticizing the cocreate product as a whole, but in the area of API I would like to see PTC invest more in the non-LISP API.
Reply With Quote
  #7  
Old 06-25-2010, 02:58 PM
Glider Glider is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
Re: Informations about Cocreate API and customization in general

Thank you very much for your replies.

Quote:
Originally Posted by clausb
If I understood the scenario correctly, once you've analysed the model in your external code, you want to either modify the existing model or add a new one. Since the .NET API currently does not provide functionality to create or modify model components, you'll have to implement this part of the task using the Integration Kit (and Lisp).
Claus, please correct me if I'm wrong.
Through API I could query the model structure, getting some generic properties like name, child, parent in model tree or dimensions of simple geometric shapes like circles, cylinders, cones but I cannot modify the model and its geometry.
Is it possible to recognize (through LISP or API) primitive geometries like cylinders, cones, parallelepipeds even if they are part of a more complex shape (for example a hole or a cone that connect two cylinders) and get their dimensions?
In this way I could get the neede geometric data from Cocreate, send them to my software through API, elaborate them to define new geometries and then send back to Cocreate the new data and draw/create/modify the model with LISP.
If this is the scenario, it seems quite complex, at least for my level of knowledge: from previous similar experiences, managing variables data conversion from/to different languages and programming environments could be challenging.

Replying to Mrstero, you say:
Quote:
That is why the .NET API for CoCreate Modeling came into existence, as it allows partners and customers to use their preferred programming language and tools. You can use both "native" languages as well as languages which produce code for the CLR.
Okay, but if it is not possible to interact with model and geometry to me Cocreate API seems of limited usefulness.
Maybe it could be used for database integration (PDM/PLM) or to automate some repetitive tasks like file format conversion, parts renaming, file managing, etc.
It could be a technical limitation cause by the explicit modeling system: maybe it is easier to define an API to manipulate geometry in parametric CADs, since it is possible to refer to the features tree and read all the parameters.

Quote:
Originally Posted by MichaelA
I agree with Claus, I don't see anything that you want to do that you can't do within Cocreate Modeling without needing any outside API. There are a number of complex LISP functions in existance (on this forum or at http://osd.cad.de/index.en.htm) that could be leveraged to help you in your coding.
MichaelA, I agree with you, but the problem is that I'd like to avoid LISP because I don't know it and because for me it could be way easier to reuse a quite large code base with a tested class hierarchy.

Two more questions.
Is possible to interact through LISP or API with the Advanced Design module?
A possible solution could be to create a model, define some constraints or parameters and then iteract with them by code to modify the model.
And what about Model Manager customization?
I found references in LISP integration kit help file, but nothing in the API one.

Sorry guys for all these questions: I like Cocreate explicit modeling paradimg more than parametric one, but Solidworks seems more mature about customization and API, so I'm trying to figure out if with Cocreate is possible to reach the same Solidworks customization level.

Thank you again.
Reply With Quote
  #8  
Old 06-26-2010, 12:02 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: Informations about Cocreate API and customization in general

Quote:
Originally Posted by Glider View Post
Is it possible to recognize (through LISP or API) primitive geometries like cylinders, cones, parallelepipeds even if they are part of a more complex shape (for example a hole or a cone that connect two cylinders) and get their dimensions?
I'm not quite sure what you mean by "recognize" in this context, so I can only try an approximate answer: Since you can automate pretty much everything in CoCreate Modeling using Lisp, I'm confident you'd get quite far this way. Whether or not the .NET API fits your specific requirements would need a little more research, such as going through some examples.

Quote:
If this is the scenario, it seems quite complex, at least for my level of knowledge: from previous similar experiences, managing variables data conversion from/to different languages and programming environments could be challenging.
Passing values from Lisp to your external COM/.NET code (and returning values from there) is trivial - all the marshaling is automatic.

Quote:
Okay, but if it is not possible to interact with model and geometry to me Cocreate API seems of limited usefulness.
.... It could be a technical limitation cause by the explicit modeling system: maybe it is easier to define an API to manipulate geometry in parametric CADs, since it is possible to refer to the features tree and read all the parameters.
Explicit vs. parametric does not play a role here. Given the time we were given for the API project, we chose to first implement the functionality required to scan the model, and to interface with Lisp and the IKIT, since this is what customers needed first. There is no secret technical limitation in CoCreate Modeling or in its .NET API which kept us from implementing modeling functionality in the API itself; it was just a matter of priorities.

Code:
MichaelA, I agree with you, but the problem is that I'd like to avoid LISP because I don't know it and because for me it could be way easier to reuse a quite large code base with a tested class hierarchy.
There's no two ways about it - from what we know about your project, you'll end up with a hybrid of Lisp glue code and your COM/.NET code. If you want to avoid Lisp at all costs, you may not like that prospect too much. However, I can say that it was very important for us to implement a smooth integration between Lisp and COM/.NET so that you don't have to worry about plumbing required to glue together the two parts of your implementation, and to allow you to reuse existing code easily.

This reminds me that I always wanted to blog more about the .NET API and what our intentions were while designing it. Oh well - I guess now that I changed jobs, that will probably never happen. But there's decent API documentation that comes with the product, of course, which I really recommend to go through.

On ModelManager customization: There's nothing specific in the .NET API for this yet, sorry.

Hope this helps & good luck,

Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #9  
Old 10-15-2023, 08:54 AM
aleena8's Avatar
aleena8 aleena8 is offline
Registered User
 
Join Date: Oct 2023
Location: argentina
Posts: 1
Thumbs up Re: Informations about Cocreate API and customization in general

Quote:
Originally Posted by Glider View Post
Hi all,

this is my first message in this forum.
Please excuse me for my bad English.
I'm evaluating the introduction of a 3D CAD in my company.
We are comparing the various solutions and one my priorities is the possibility of writing some customization to automate some ripetitive tasks.
At the moment we reduced the choice to Solidworks and Cocreate.
The main need is to project molds, dies and tools for fasteners, obtained by wire cold forming processes.
Since we produce a lot of special parts, every time we get an order we need to make a project, develop the process cycle, drawing the dies and tools.
I didn't find on the market a solution for this task (something similar to Solidworks' Logopress3 for sheet metal but dedicated to wire) and since I already wrote in the past a software to make some of the needed calculations, I' trying to understand if is possible to customize Cocreate for my needs and find a way to let my software to interact with Cocreate.
I already asked about API, LISP, customization to sales and technical guys of a local reseller, but when I spoke with them about these arguments, they were not able to answer.

My idea is to draw the part in 3D (for example a screw), get the volume of the whole screws or of some specific sections and trandform a complex shape in a simpler one keeping a constant volume.
To make an extreme semplification, if I draw two cylinders joined by a truncaded cone, I'd like to get the volume of this shape and calculate the lenght of a cylinder of a given diameter with the same volume of the starting part.
Then the CAD should draw by itself the cylinder.
Obvioulsy my process is more complicated, but at the end it is a sequence of this kind of calculations.
After I draw the different cold forming steps , I need to draw the dies and mold components, which for 80% of cases arise from well defined shapes and geometry.
These are time consuming and repetitive tasks, prone to stupid errors during calculations.

My main goal is to recycle my software written in Object Pascal (Delphi) and interface it with Cocreate through COM, to manipulate parts, geometry and drawing inside Cocreate.

So my questions are:

1) From what I read in this forum and in Claus Brod web site, it seems possible to implement my idea in LISP, but I'd like to know before paying the licence

2) Reading Cocreate API help files, it seems that through the API is not possible to reach the same level of LISP interaction with Cocreate enviroment, user interface and parts geometry.
Since in Cocreate there isn't an integrated development environment like Solidworks or Solidedge VBA and since I don't know LISP, it will be a nightmare to implement, develop and debug my algorithms in an unknown language with a simple text editor.
Is possible to customize and interact with Cocreate through API and COM with the same level of integration assured by internal LISP?

3)In the COM.NetApiReadme.pdf file found in Cocreate help directory I found this statement:
'While we will accept specific API defect reports we are not actively enhancing the CoCreate Modeling COM/.NET API.'
In the first page of CoCreate.OsdmObjects.chm help file I found this:
'Support for external .NET clients is planned for future versions of the API.'
Which one is right?

Thank you in advance for your replies.

Is it possible to customize and interact with Cocreate through the API and COM with the same level of integration as internal LISP? I would be very happy if you could let me know, thanks. I know this is an old discussion but the answer to my question is very important I am appealing to the admin. Please approve my post,Thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:58 PM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.