Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/14/2022 in all areas

  1. Often is the smallest stuff that trips us up!
    2 points
  2. I figured out what is was, as little and simple as it way. I forgot to add "done dialog" to the action tile, getpoint now works fine, (defun JH:insert-mapping (reference / NE NW SE SW PT Scale Rotation Symbol NEpath) (done_dialog dlg_id) (setq NE (strcat (apply 'strcat reference) "NE") NW (strcat (apply 'strcat reference) "NW") SE (strcat (apply 'strcat reference) "SE") SW (strcat (apply 'strcat reference) "SW") Symbol (substr NE 1 2) ) ;(setq PT (getpoint "\nInsertion point")) ;(setq Scale 5000) ;(setq Rotation 0) (if (and (findfile (setq NEpath (strcat "X:\\3. Event TM Plans\\Mapping\\data\\" Symbol "\\" NE ".tif"))) (findfile (setq NWpath (strcat "X:\\3. Event TM Plans\\Mapping\\data\\" Symbol "\\" NW ".tif"))) (findfile (setq SEpath (strcat "X:\\3. Event TM Plans\\Mapping\\data\\" Symbol "\\" SE ".tif"))) (findfile (setq SWpath (strcat "X:\\3. Event TM Plans\\Mapping\\data\\" Symbol "\\" SW ".tif"))) ) (progn (setq echo (getvar 'cmdecho)) (setvar 'cmdecho 0) (command "IMAGEATTACH" "f" NEpath "G" "E") (command "IMAGEATTACH" "f" NWpath "G" "E") (command "IMAGEATTACH" "f" SEpath "G" "E") (command "IMAGEATTACH" "f" SWpath "G" "E") (setvar 'cmdecho echo) ) ) )
    2 points
  3. or even http://lee-mac.com/intersectionfunctions.html specifically acextendthisentity or acextendboth
    2 points
  4. I am going to send you off in another direction completely (just because)....Lee Mac has a Double Extend routine (http://lee-mac.com/doubleextend.html) which you could modify to extend the initial line, offset that and then just draw lines between the 4 end points. If the first 2 lines are just offset from each other then both ends A and ends B will line up? Half a days holiday so not much time to look at your LISP just now but above could work if you are really stuck
    2 points
  5. yeah the (JH:insert-mapping) is called inside a action tile I tried adding in a done_dialog into the accept action tile but I had similar issues to what I had before with the dialog box not closing, it was added different to what you have provided here so ill try add how you've suggested. thank you, It makes much more sense how you put it then how I've been trying it
    1 point
  6. @mhupp that is true, but I think that generates a different error code (or no error code - see test below) than a "bad argument type" on a string value. Command: (open "C:\\nofilehere.csv" "r") nil from (open) function in help:
    1 point
  7. So without seeing your full code, I presume then that the (JH:insert-mapping) function is called from an action tile? The reason I ask because: 1) you don't call (done_dialog) with the ID of the dcl file. it should only be active within the running dialog so it doesn't need the dialog pointer. The argument supplied with (done_dialog) is to supply a return value as seen in #2 below. 2) I think it is better practice to supply a output code to done_dialog on the main code and use the output value to run the function. ;; Set the actions to of the buttons to close the dialog with a return value (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") ;; Start the Dialog and capture the exit value from (done_dialog) in 'ret' variable. (setq ret (start_dialog)) ;; Unload the Dialog after close. (unload_dialog dclid) ;; Use the 'ret' variable value of the dialog to run the correct function. (if (= ret 1)(JHinsert-mapping))
    1 point
  8. One option would be to create a 3D cube then slice away portions of the cube or subtract from it.
    1 point
  9. I opened the file and exploded some of the blocks. In the image on the left, the grey parts are the blocks that I exploded. Then I ran Flatshot and got the image on the right. As I was exploding blocks I found that some blocks are inserted twice, so there are duplicates that are overlapping. The model needs to be cleaned, to remove all the duplicate overlapping blocks. As for exploding blocks, I only had to explode some of them to get Flatshot to work, so I'm not sure what the problem is. Maybe there are some bad blocks? A lot of the blocks that I exploded were mirrored. Maybe that's an issue? Maybe copy and rotate would be better than mirroring? You will have to experiment to find out what the root cause of the problem is. In the meantime, exploding the blocks seems to work.
    1 point
  10. Is it possible to get a thank you first ?
    1 point
  11. Extrude in one direction. Mirror and Union.
    1 point
  12. I was trying to flatten a 3d drawing to a 2d drawing, and I did it with some other comment.
    0 points
×
×
  • Create New...