×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

CATIA V5R17 doesn't write apropriate design table on xls
2

CATIA V5R17 doesn't write apropriate design table on xls

CATIA V5R17 doesn't write apropriate design table on xls

(OP)
Hi All

I am trying to create some parameters and write them on an excell file , CATIA creates the xls file , but excell can not read it , mentions it's another format , but when I open it , the file is empty , what's the problem ? office is 2010 btw

thank you very much

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
well I simply created a part with three parameters , as three of the dimensions are related to these parameters , once I have them , I can make a design table , right ? and create it by indicating the parameters I want to export and write on an excell or text file , among these two option , my Catia can export a txt file but not an excell file , then I need to open it with matlab and change the parameters , I want to know once I change the parameters of the excell file or txt file , do they also automatically change in Catia ? I have seen one video on youtube on this , but don't know how accurate it is , I also want to know if it is interactive , I mean after changing the dimensions , Matlab can receive the new file with new dimensions.

RE: CATIA V5R17 doesn't write apropriate design table on xls

On solid7 blog was a very good tutorial about this but now that blog is not existing anymore...name of tutorial is Parameters and Formulas Tutorial , maybe with Google....

I've done in the past an Excel file which is communicating with CATIA (and back) but I have to remember where I post it smile ) , is doing somehow what you wan.

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
thank you so much , I would be really looking forward for this post , the tutorial is in one of those sites that are not for free

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
That's great , thank you so much ! could you please put some comments on this ? like how to create it , is it interactive ? press buttons need some Macros ??

this is very much helpful , but I need to know , how to make this ... and how automatic it can be

RE: CATIA V5R17 doesn't write apropriate design table on xls

Don't have so much time now but in short, you need to create a CATPart exactly how is looking in the picture, with formulas and parameters exactly as you saw there, then modify values in Excel and see what is going on.

By pressing the buttons you run the macros inside Excel file.

The excel vba is not protected, so you can take a look also in the code. I will try to find also that tutorial later.

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: CATIA V5R17 doesn't write apropriate design table on xls

What release of Catia are you running?
What SP have you applied against Office?

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
@garzar : I am using catiaR17 , sp5 , office 2010

@fernando : thank you , still I will need help , well the Macro is in VB , just can I ask , this part is what you have written or it's made by excell while creating the cat file ? thanks a lot , I think I should wait to see if the tutorial could be found , thank you so much for you kind help and attention Fernando , it's a big help and big part of my work

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
just one thing that , in my Visual basic , when I click on references in tools , it's not even active ,what's the problem ?

RE: CATIA V5R17 doesn't write apropriate design table on xls

The CATPart is created first as you see in picture manually, in Excel you just manipulate dimension (new dimensions which will modify the CATPart or retrieve dimensions when you will modify in CATIA).

There are possibilities to create automatically the parametric part with formulas, relations a.s.o. , eventually based on a predefined design table, I've done also an example in the past.

I hope this evening (in Bucharest is morning now) I will have time to find all of them.

To access Tools-References you need to stop debugging (this is the most common problem, trying to access when code is running and forget to stop running the code).

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
Thanks a lot I am in Italy , I'll be checking the updates Fernando , thanks

RE: CATIA V5R17 doesn't write apropriate design table on xls

This is a known issue with R17.
Check the Dassault Knowledgebase; but, I do not think they have a solution for it since they do not support releases that old.
They only support releases that are at most two release levels old.

RE: CATIA V5R17 doesn't write apropriate design table on xls

Hi,

I would suggest to read first in help docs about design tables and parameters.

You have here solid7 tutorial, pity he is not so active now in the forum, you could learn a lot from him (as from many others here).

Now, copy this design table in C:\Temp folder , open an empty CATPart and run this macro (to create a prism, is a recorded macro, just for example).

With the prism created, you can run now macro to play with design tables configurations (by modifying the configuration you can modify dimensions also).

All macros are hard coded, just for exemplification, so you have to respect what is written inside smile .

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
Thank you very much Fernando , just one question in which format should I save the first design table in C:\Temp folder ?

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
Thank you so much , but may I ask you , at the end , what about my question , that how would catia be controlled through excell output of this macro by Matlab for example ? thanks a lot for the tutorial , I think now I need to know how should I produce the macro files , this way , also there are some lines need debugging ( line 21 for example ) I am searching to see what happens

RE: CATIA V5R17 doesn't write apropriate design table on xls

Sorry, can't help you, I'm not using anymore Matlab...that was long time ago smile but macros inside Excel file can read or modify CATIA parameters. I suppose you need to setup somehow link between Matlab and Excel (but I'm asking myself why not to connect directly to CATIA...).

The macro in Excel can have problems because of Office version, for me is still working fine (CATIA v5r21 , Office 2003).

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
thank you Ferdo

Just wanted to know , that the first excell file that you uploaded , you have written the macros independently from CATIA ? the file that has modifying buttons

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
I am still searching for an apropriate tutorial something , where should I start ?

I want to know also , if it's possible to write the Macro in excell that can save the edited file in CATIA as a step format

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)

I have encountered a very simple problem , I have opened a Macro runtime window , and put this line in it

Language ="VBScript"

Sub CATMain()

Dim Document0 As Document

and I get an error of expected end of statement

while it is exactly as it's written in the help and everywhere

what is the problem ?

RE: CATIA V5R17 doesn't write apropriate design table on xls

Each "Sub" needs an "End Sub"
Example:

CODE --> CATScript

Language="VBSCRIPT"

Sub CATMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim product1 As CATBaseDispatch
Set product1 = partDocument1.GetItem("PART1") 'the Part Number of the part is "PART1"

product1.DescriptionRef = "TEST DESCRIPTION 2"

End Sub 

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
well my code also had the end sub , I just did not put it here , cause the code running stops in this line , but when I ran it as catscript it worked.

@Fernando : on the prism code there is the same problem , but also a bit more , that when I run it as VBscript the expected end of statement appears , and when I run it as CATScript , the line activedocument is not accepted as a right argument , so I don't know which is which and how to correct it

RE: CATIA V5R17 doesn't write apropriate design table on xls

Those are CATScript not catvbs, I told you what you have to do if you want to run it as catvbs. You need to Google a little bit to see differences between them (and generally speaking differences between different other languages which seems to be similar).

Macro prism will run correctly if you open first an empty part, if your active document is nothing or something else then CATPart, macro will give you that error.

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
@Fernando : I honestly have searched , not a bit , but a lot , finally I have got some sources , I am reading them , I did according to your advice , the error moved to the line 21 of Prism !! another one ( the method failed ...)

even I get the "expected end of statement " error for this simple script when also I open the part :

Sub CATMain()

Dim strHello As String

strHello="Hello"

MsgBox strHello

End Sub


sorry for many questions , but I am studying the books but in CATIA can't take even the first step

RE: CATIA V5R17 doesn't write apropriate design table on xls

(OP)
I even tried the codes with regarding to the condition , opening a part body , but it still doesnt work properly , same errors , anyone could help me ?

RE: CATIA V5R17 doesn't write apropriate design table on xls

Maybe you could try using the macro recorder to record the same procedure in both languages.
Then compare the code.

Personally, I prefer VB.NET.
Its easy to work with and much more powerful that a scripting language.
But, I see this thread is deviating well far away from where it started; so, I'll leave it at that.

RE: CATIA V5R17 doesn't write apropriate design table on xls

garzar is right. You should start another thread but all what you told us in lasts posts are really basic programming stuff. Probably a basic programming training will clarify you all these elementary things.

No one can help you if you don't provide pictures or tell what are you using very clear -vba in CATIA or Excel, CATSCript, catvbs or what ever....

For example, your last code is working fine for me in CATScript, CATIA v5r21, doesn't mater if I have something opened or not in CATIA.

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources