Message 1 of 4

Not applicable
05-13-2020
08:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I can change the length of a pipe by right-clicking it in the assembly tree, selecting "Change Size", and setting the PL field. However, when I do the same thing using the API, nothing happens and the pipe stays the same length.
// pdoc is the document for the pipe part
foreach (Inventor.PropertySet pset in pdoc.PropertySets)
{
if (pset.Name != "Inventor User Defined Properties") continue;
foreach(Inventor.Property p in pset)
{
Console.WriteLine(p.Name);
Console.WriteLine(p.Value);
p.Value = "20.000 in";
Console.WriteLine(p.Value);
}
}
I can see the value of both L and PL change from "10.000 in" to "20.000 in", but after the script finishes the pipe is still 10 in long.
Solved! Go to Solution.