Cable Length Parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Is this relation written in the harness.prt or the harness.asm containing the harness.prt and connectors?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you use the length function is it reporting the result as 0?
- Select Applications > Cabling > select Cable length from Info Group
- Select a cable from graphics area
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Performing the following steps below and then clicking the cable in the graphics window, I am getting an actual length value, NOT zero.
- Select Applications > Cabling > select Cable length from Info Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I added the space and evaluated. I'm still receiving an error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Same issue when running a simple wire. Result is zero.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Are you in cabling mode when you are evaluating the length? IE do you see the active part symbol next to the harness part?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No, I don't think you can apply a relation to the harness in cabling mode? I tried this initially.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The relations within the dialogue box are grayed out/inactive while in cabling mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
