What I wish to do is to assign a set of points a sequence of point numbers (or custom properties) of my choosing. For example, I have the following points:
100
102
104
105
107
I wish to assign point 100 -> 1000, 105 to 1001, 107 to 1002, 104 -> 1003, and 102 ->1004. Basically, I am looking for a command or utility that implements the "TCOUNT" (using select-order) command, but for Cogo points instead of text. The renumber points command appears to only work with offsets, and does not eliminate gaps. I can sequence the points if I select the points I want, then copy them -> set duplicate points to sequence from the range I choose, but this does not allow for reordering of point numbers. I tried individually selecting them in the order I wanted, but didn't change the order in which they were numbered.
Alternatively, I can leave the point numbers the same, and assign a user defined property that I can use to sequence the points in the order of my choosing. However, I'm not sure how to go about assigning the sequence I wish short of typing in each value individually; obviously non-ideal.
A third possibility that presented itself to me was to create new, correctly sequenced points that overlap exactly with the old ones, and then somehow merge the two sets together. Would there be a way to merge the old points and the new ones based on the fact that the two points have the same X-Y coordinates? Preferably done in CAD itself; the last resort would be to export both sets of points out to excel, then do some fancy manipulation in excel, then reimport into CAD.
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
I've been using this command for a while now (thank you again to Jeff!) but now that I've upgraded to Civil 3D 2013, I'm getting an error;
"; error: bad argument type: stringp nil"
Any help would be appreciated.
Open the lisp file using either Notepad or the VLIDE inside C3D. Find the section of code that looks similar to this, then make it look exactly like this (add a few lines so it finds C3D2013).
(setq verstr (cond ((vl-string-search "\\R18.0\\" prod) "7.0" ) ;;2010 ((vl-string-search "\\R18.1\\" prod) "8.0" ) ;;2011 ((vl-string-search "\\R18.2\\" prod) "9.0" ) ;;2012 ((vl-string-search "\\R19.0\\" prod) "10.0" ) ;;2013 ) )
Save it then reload.
Jeff, I've modified the lsp as per your instructions, and am now getting the following error:
; error: "no applicable method for:" (QueryInterface nil)
Hi folks,
I revised the reorderpoint.lsp program to work with C3D 2014 as well as 2010-2013, which appears to be a slightly different version than the one last posted by Jeff, so I can't tell you what the exact difference is. Also fixed a shortcoming and a bug. As always please test it out to make sure it is doing what you would expect and use at your own risk.
Gavin
Thanks so much to you all! This worked perfectly, version 2013. You guys rock!
Hi hmartinez5,
Unforetunately, I don't have access to C3D 2015 to test out a modification for C3D 2015. The lsp file needs to be updated to take into account the software version numbers for 2015. Similar to what Jeff had described a few posts before, you can modify the lsp file to include the 2015 version numbers. I have shown the subject portion of the file below that shows the new code to add in orange. Hopefully this will get things working for you, but I am unable to verify on my end. Please test it out and confirm that works.
(setq verstr (cond ((vl-string-search "\\R18.0\\" prod)
"7.0"
)
;;2010
((vl-string-search "\\R18.1\\" prod)
"8.0"
)
;;2011
((vl-string-search "\\R18.2\\" prod)
"9.0"
)
;;2012
((vl-string-search "\\R19.0\\" prod)
"10.0"
)
;;2013
((vl-string-search "\\R19.1\\" prod)
"10.3"
)
;;2014
((vl-string-search "\\R20.0\\" prod)
"10.4"
)
;;2015
)
)
Thanks for the information. It looks like it loaded correctly but I can't run the command, I get the following error.
; error: "no applicable method for:" (QueryInterface nil)
Well, as I said, I don't have C3D 2015, so I can't verify or troubleshoot on my end. If no one else responds by tomorrow, I'll see if I can try it out with the a trial version of C3D 2015. No promises, its possible that there is more going on with the code in relation to the new software version then I have time to troubleshoot.
gjrcmb,
The trial version of C3D 2015 is good for 60 days. What are you waiting for?
Dave
Dave Stoll
Las Vegas, Nevada
Jeff,
I keep getting the same error. I tested it on two different stations with C3D 2015 and receive the exact same error.
; error: "no applicable method for:" (QueryInterface nil)
You made sure to overwrite the old with the new one I just posted? And loaded the new version? That error is one I don't recall ever seeing in any lisp, so not at all sure what the problem might be. As I said, I tested it here and it works just fine.
OK, I just duplicated that error. I ran the command in adrawing which contains no points and got the (QueryInterface nil). So, make sure you have a drawing with points in it in order to use the command ReorderPoints....
If you are trying it in a drawing WITH points, could I see the drawing to duplicate what you are getting here?
Hey Jeff,
I appreciate you jumping in and clearing up the situation. Kudos to Ross Dunkley as well. Glad to see that folks are actually using the app and finding it useful.
Cheers,
Gavin
If I am understanding things correctly, nice additions to the application to make it version independent and more robust. Awesome. Thanks again.