Results 1 to 5 of 5

Thread: Swap Parts

  1. #1
    Member
    Join Date
    2007-06
    Posts
    44
    Login to Give a bone
    0

    Default Swap Parts

    Hi,

    I have a question regarding the swap parts. I know that you can send commands to the prompt from VB but I want to automate this. I basically want to know if it is possible to swap parts by using VB. If it is possible could someone please help me, I have been searching for quite some time now. Thank you very much.

    Chris

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Swap Parts

    It would be helpful if you provided more information. What do you mean by "swap parts"?
    C:> ED WORKING....


    LinkedIn

  3. #3
    Member
    Join Date
    2007-06
    Posts
    44
    Login to Give a bone
    0

    Default Re: Swap Parts

    Hi,

    If you were to create a pipe network and right click on the structure, you are given the option to "swap parts". Inside this option you can choose the part you want to change it to. I basically want to be able to automate this by using VB. I am using C3D2007 if that helps at all. I know I can send the command (swapnetworkpart) to the prompt via VB but half the time I get unexpected results, so for certain situations I want to automatically swap them out after running the code. An example would be after you have your network all setup, you run the program. If there are pipes that have a depth >= 15' but are only 48" for the inner structure diameter, I want to change the value to 60". Sorry about the lack of information in the first post, hope that helps.

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Swap Parts

    Quote Originally Posted by Christopher.cornell
    I am using C3D2007 if that helps at all.
    Yeah, that makes a difference. I don't have C3D. There's only a couple of pointers I can give you. The reason you get unexpected results with SendCommand is that it is asyncronous from vba. You'll need to use the api from C3D, but for that you'll have to wait for someone else to help. Typically, though, the api won't give you the ability to run a command. You will have to duplicate the functionality of the command and then alter it to suit your needs. I.E. select the part to be replaced, identify what network it belongs to, determine what it limitations are, present a list of accepible parts to the user, etc., etc.
    C:> ED WORKING....


    LinkedIn

  5. #5
    Member
    Join Date
    2007-06
    Posts
    44
    Login to Give a bone
    0

    Default Re: Swap Parts

    Yeah, that is kind of how I was trying to go about doing it. I filtered through everything in the network and got just the structures, and out of those got just the structures that needed to be changed, then sent the coordinates in to the prompt along with the "swapnetworkpart" command. The problem is though I cant make a list of parts for them to swap instead of going through the send command because I cant get the parts. Im guessing the API for this has not been released yet as I have spent several hours trying to find it. The way you are suggesting is how I was going to approach this, but I am just having a difficult time finding information. Thank you very much for your help, I really appreciate it.

Similar Threads

  1. Swap parts for Pressure pipes
    By Wish List System in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2014-11-14, 09:14 AM
  2. Parts From the CC Display Modified Lengths in Parts List
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 2
    Last Post: 2012-12-19, 04:16 AM
  3. 2012: ICOPY, supressing parts and constraining standart parts
    By damper1839380 in forum Inventor - General
    Replies: 0
    Last Post: 2011-12-21, 03:33 PM
  4. Swap Parts in Profile View
    By civil3d.wishlist1941 in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2008-11-10, 04:45 PM
  5. Mirror Assembly Parts as True Parts
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 0
    Last Post: 2006-07-09, 04:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •