Norm Kirchner Posted April 5, 2005 Report Share Posted April 5, 2005 Among other capabilites, I'm looking to move / distribute a selection of wires. NO , I do not want to use the "clean up wire" method. I'll do the processing of what new positions they need to go to, but I can't find a function that will successfully move a wire/section of wire. Any direction? :question: Quote Link to comment
David Boyd Posted April 6, 2005 Report Share Posted April 6, 2005 Among other capabilites, I'm looking to move / distribute a selection of wires.Any direction? :question: 4436[/snapback] Norm, So, you've got an array of wire refnums, is that correct? And you want to script a way to move them around without changing the actual wiring? I hope I've got the task correct. If so... A wire refnum has properties for the Terminals[] which it connects. There's always one source and one or more sinks. ( I think I saw somewhere that the source is always the zeroeth element, but I'm not sure.) A wire also has a read-only property, Joints[], which describes an array of clusters of segments and branches. The problem here is that the wire's Joints[] property is read-only. BUT, if you get references to the Terminals[], and figure out source and sink(s), there's a method on a Terminal refnum for 'Create Described Wire'. I think you can invoke that with your computed array of junctions and segments (how you do all this sounds like quite a chore, good luck ), and LV should replace the existing wire with the described wire (since redundant wire paths were rendered impossible to produce starting around, I think, LV 6). Is this what you want to do, or did I miss the point? Best, Dave Quote Link to comment
David Boyd Posted April 6, 2005 Report Share Posted April 6, 2005 Norm, As a follow-up - I played around with this a bit and though my brain is too tired to figure out the LV coordinate system at this late hour, I did learn two things: Create Described Wire does not replace the existing wire, I had to invoke Delete on the wire refnum (obtain its terminals first!) it's very easy to create lots of broken wire segments trailing off from your 'good wire' if you don't have a Cartesian clue I can't count Best, Dave Quote Link to comment
Norm Kirchner Posted April 8, 2005 Author Report Share Posted April 8, 2005 Well I'll be brief at this late hour myself. I was trying to do something very specific so flexibility didn't get in the way of the first few learning steps. I have a BD in which I had 14 segments of wires selected. Got the Selection[] and casted those ref's to wires like their class name suggests. From there I wanted to kabitz w/ their positions to do a control like distribution. Maybe I just need to dig up the business cards from the LV R&D guys that I got at NI week last year to get the "unofficial" skinny on this Quote Link to comment
brian175 Posted August 4, 2005 Report Share Posted August 4, 2005 As a follow-up - I played around with this a bit and though my brain is too tired to figure out the LV coordinate system at this late hour... The attached VI contains these VIs from the XNode llb which could be helpful figuring out the coordinate system: C:\Program Files\National Instruments\LabVIEW 7.1\vi.lib\Utility\XNodeSupport.llb\XRect16To32.vi C:\Program Files\National Instruments\LabVIEW 7.1\vi.lib\Utility\XNodeSupport.llb\XRect32To16.vi C:\Program Files\National Instruments\LabVIEW 7.1\vi.lib\Utility\XNodeSupport.llb\XPoint32To16.vi C:\Program Files\National Instruments\LabVIEW 7.1\vi.lib\Utility\XNodeSupport.llb\XPoint16To32.vi Download File:post-987-1123171014.vi Brian Quote Link to comment
Aitor Solar Posted August 16, 2006 Report Share Posted August 16, 2006 Has anybody managed to access a wire branch instead the whole wire? I have a wire that connects one source and several sinks, and I want to delete just one segment, leaving the rest intact. But I can't see how, all methods and properties refer to the whole wire, though this can easily be done manually. I could delete the wire and re-connect the source to the remaining terminals, but dinamically created wires are not really clean and it could lead to new problems . Saludos, Aitor Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.