cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Cable Length Parameter

wbottis
12-Amethyst

Cable Length Parameter

Hello,

I have routed a cable.  How can I display the length of the cable in a table (i.e. what parameter captures the length of the cable)?  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Chris3
20-Turquoise
(To:wbottis)

Are you in a linked (Windchill - PDMLink) Session? If so then the part may just be set to read only or not checked out.

 

You need to enter the relation into the relations dialog box and set it equal to some name which will then show up as a parameter that you can use in a table or elsewhere.

View solution in original post

32 REPLIES 32
tbraxton
21-Topaz II
(To:wbottis)

Write a relation that uses the cable_len function in the part of interest. You can then use the parameter defined in the relation in a table or note.

 

For a segment of a cable or bundle, use the following syntax:

cable_len ("cable_name",location_id1,location_id2)

 

For a cable length from the proximal to distal connection, use the following syntax:

cable_len ("cable_name",-1,-1)

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
wbottis
12-Amethyst
(To:tbraxton)

Is this relation written in the harness.prt or the harness.asm containing the harness.prt and connectors?

wbottis
12-Amethyst
(To:wbottis)

OK, I wrote the relation in the .asm file containing the routed harness and it's calculating a length of 0.  I'll keep trying.

tbraxton
21-Topaz II
(To:wbottis)

I would define the relation in the part files unless the length can only be calculated in the context of an assembly.

 

Details on the cable_len functionality.

http://support.ptc.com/help/creo/creo_pma/usascii/index.html#page/electrical_design/cable/About_Fixing_the_Length_of_a_Cable.html 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
wbottis
12-Amethyst
(To:tbraxton)

No matter what I use as the "cable_name", the result is 0.  I have used "CABLE_1", which is at the top of the model tree, but the result is still 0.

tbraxton
21-Topaz II
(To:wbottis)

If you use the length function is it reporting the result as 0?

 

  1. Select Applications > Cabling > select Cable length from Info Group
  2. Select a cable from graphics area
  3. Select from and to cable locations of the segment to measure on the screen

Notes:

  • For a correct segment length measurement, select from and to locations through which the selected cable is actually routed
  • The locations must be selected on the screen, not in the Model Tree
========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
wbottis
12-Amethyst
(To:tbraxton)

Performing the following steps below and then clicking the cable in the graphics window, I am getting an actual length value, NOT zero.

  1. Select Applications > Cabling > select Cable length from Info Group
tbraxton
21-Topaz II
(To:wbottis)

As a first step I would post the exact syntax you are using to define the parameter in the relation editor. If that does not help then you should post the models and your system setup for more help.

 

Since manually querying the length reports an accurate value it would seem it is not a bug. The most likely cause is that the syntax of the relation you are writing is not compliant with the requirements. It is difficult to determine the root cause without access to the data. I do not have access to a Pro/Cable license currently  but someone else may be able to debug your model.

 

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
wbottis
12-Amethyst
(To:tbraxton)

Here is the syntax I am using:

length=cable_len("cable_1",-1,-1)

where, "cable_1" is the first feature in the harness.prt as shown below.  Note: the relation was successfully verified, but is stating 'Probable error in function evaluation.'  Also, note that the relation was applied to the assembly containing both the harness.prt and the 2 connectors on either end of the cable.  Thank you.

wbottis_0-1621947609669.png

wbottis_1-1621947648789.png

 

tbraxton
21-Topaz II
(To:wbottis)

It appears your syntax is bad. You left out the "space" after cable_len in the relation.

cable_len ("cable_name",-1,-1)

 

Your relation omits this space.

"Here is the syntax I am using:

length=cable_len("cable_1",-1,-1) "

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
wbottis
12-Amethyst
(To:tbraxton)

I added the space and evaluated.  I'm still receiving an error.

wbottis_1-1621951906732.png

 

tbraxton
21-Topaz II
(To:wbottis)

Are there any other relations in your model that you are testing? I would simplify the test case as much as possible.

Make a simple model of a cable and test this approach, I can tell you that it has worked previously.

It is possible that there is a bug, open a call with PTC support if you think it is.

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
wbottis
12-Amethyst
(To:wbottis)

I created a new cable assembly, entered the function, and evaluated.  The result is zero.  The cable assembly has 2 connectors with a straight length of cable spanning them (two cable locations).  Measuring the length yields an actual result, so the same issue here.

wbottis_1-1621956477429.png

 

Chris3
20-Turquoise
(To:wbottis)

I think the problem is your wire isn't named cable_1. Use the find command and change the look for to be cable. Then do history all. Find the wire you are looking for and then note the name after "cable:"

 

For instance the find results will look like:

Cable:w1:AssemblyName

In this instance w1 is the name of the wire/cable.

 

Its also possible that bundles can't be measured this way ... I just tried one (really short one) and got the same result as you. I don't have any other bundles to try quickly.

wbottis
12-Amethyst
(To:Chris3)

Chris, I have located the name of the cable using the find command.  Per your interpretation, CABLE_1 is the name of the cable, so this does not appear to be the issue.  I will try and run a wire instead of a cable next.

wbottis_0-1621960187325.png

 

wbottis
12-Amethyst
(To:wbottis)

Same issue when running a simple wire.  Result is zero.

wbottis_0-1621960494689.png

 

Chris3
20-Turquoise
(To:wbottis)

Are you in cabling mode when you are evaluating the length? IE do you see the active part symbol next to the harness part?

Capture.PNG

wbottis
12-Amethyst
(To:Chris3)

No, I don't think you can apply a relation to the harness in cabling mode?  I tried this initially.

Chris3
20-Turquoise
(To:wbottis)

When you have an assembly active and go into the cabling module it should activate the harness part. If you don't see the part being activated then the relation is not going to work.

Capture.PNG

Assembly

   -Comp1

   -Comp2, etc

   -Harness_part.prt

In this example, the harness_part.prt has the activate icon as shown above when you are working in cabling mode. When this happens, the cable_len relation will work.

wbottis
12-Amethyst
(To:Chris3)

It's not clear to be how to access the relations dialogue box when in cable mode.  I literally cannot access the relations command dialog box in cable mode in order to verify if the relation works.

Chris3
20-Turquoise
(To:wbottis)

Don't try and open the harness part by itself. Creo won't let you do that. When you a have the assembly open that has the harness part in it, enter cable mode. The harness part should now be active within the assembly you have open. With the assembly still open click on the tools tab and then click on the relations button.

wbottis
12-Amethyst
(To:Chris3)

The relations within the dialogue box are grayed out/inactive while in cabling mode.

Chris3
20-Turquoise
(To:wbottis)

ok well I am not sure why that is but that is definitely the source of your problem. You are trying to apply the relation at the wrong component level.

 

I forget if this has changed, but I am using Creo 7 and when you enter cabling mode there is a cabling tab. If you click off of that tab and then click on the tools tab the relations button should be active.

 

You do have a harness part right? You clicked "Create Harness" on the cabling tab? I would suggest creating a new assembly. Click Create harness give it a name and then click on the tools tab and the relations button should be active.

wbottis
12-Amethyst
(To:Chris3)

I stand corrected.  In cabling mode > tools > relations, the content in the dialogue box is grayed out, but I was able to open the 'evaluate' command box.  Entering the function 'cable_len ("cable_1",-1,-1)' did in fact calculate the accurate value of the cable!  Appreciate the persistence, Chris.  Now, to display that value in a table for the cable drawing...

Chris3
20-Turquoise
(To:wbottis)

Are you in a linked (Windchill - PDMLink) Session? If so then the part may just be set to read only or not checked out.

 

You need to enter the relation into the relations dialog box and set it equal to some name which will then show up as a parameter that you can use in a table or elsewhere.

wbottis
12-Amethyst
(To:Chris3)

Chris, right again.  The harness.prt was not checked out (usually you are prompted to check out when prompting or toggling a change to a part).  I added a relation after checking out 'length=cable_len ("cable_1",-1,-1)' and after entering '&length' into the table cell, the proper value has been displayed.  I think the harness.prt has to be added to the drawing in order for the length value to register, but I could be wrong.

 

As a test, I removed the harness.prt from the drawing (the assembly was still attached to the drawing) and the length value stayed in the table after regenerating with a dimension ID (LENGTH:358).

Chris3
20-Turquoise
(To:wbottis)

In your case 358 is the session ID. You can reference component parameters from different models using the session ID. There are some threads in the forum here about session IDs if you want to know more about how to find and use them.

kdirth
20-Turquoise
(To:wbottis)

I have not used cabling yet, but seems to me you are measuring from one end to the same end with cable_len ("cable_name",-1,-1).  Should -1,-1 be -1,1 or -1,0 or 0,-1?  Not the same location ID for both ends.


There is always more to learn in Creo.
wbottis
12-Amethyst
(To:kdirth)

Thanks for the suggestion.  I have tried all those combinations with zero as the result.  I also tried the actual cable ID numbers shown in the model tree with the same result (i.e. 46 and 47).

Top Tags