Author Topic: Wrong insertion point upon automated insertion in BricsCAD with LISP  (Read 1847 times)

0 Members and 1 Guest are viewing this topic.

S.Langhammer

  • Guest
Hey,

I'm currently working on a routine to pick specific drawings, to import their model space and save it as block in the currently open drawing.

I've attached the scipt, that came out so far and a block on which I noticed the problem, to this post.

I'm Working With BricsCAD V16.  When I use the IMPORT and -BLOCK commands manually, everything works just fine.
Once I'm using the automated script, the insertion point is stuck on the solid somewhere. It would be really important, that the insertion point for the generated blocks is in the right place.

Anyone got an idea what the soruce of this problem is or even how I could solve it?

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #1 on: June 22, 2016, 08:35:21 AM »
Move your block to '(0. 0. 0.) .. right now it's sitting 0.6 units to the left.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

S.Langhammer

  • Guest
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #2 on: June 22, 2016, 09:33:52 AM »
Sorry, but that is exactly what I want to avoid. All graphics should remain exactly where they are in the original files.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #3 on: June 22, 2016, 09:34:14 AM »
Move your block to '(0. 0. 0.) .. right now it's sitting 0.6 units to the left.
Or use the BASE command, ...but is better move to 0,0,0   :|

danallen

  • Guest
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #4 on: June 22, 2016, 11:23:51 AM »
watch out for osnaps? does using -INSERT instead of IMPORT, and using the auto created block definition help you?

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #5 on: June 23, 2016, 01:53:36 AM »
In AutoCAD the variable OSNAPCOORD is default 2, which means priority for Coordinate Data Entry will use keyboard entry first except scripts. Lisp and Scripts will snap to objects when coordinates are entered, while keyboard entry will use the given coordinates.

I assume BricsCAD has the same system variable.

You can set it to 1 (at top of your script) or temporary disable Object Snap at the beginning of your lisp routine.
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

S.Langhammer

  • Guest
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #6 on: June 23, 2016, 02:00:47 AM »
watch out for osnaps?

Thanks! That was exactly it!

You can set it to 1 (at top of your script) or temporary disable Object Snap at the beginning of your lisp routine.

I'll probably go with the disabled snaps. Thanks a lot!

ur_naz

  • Newt
  • Posts: 68
  • Made in Ukraine
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #7 on: June 25, 2016, 10:33:35 AM »
Put your look on vla-InsertBlock

S.Langhammer

  • Guest
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #8 on: June 27, 2016, 04:33:05 AM »
Put your look on vla-InsertBlock

Thanks for the tip. That ruled out an error on a collegue's machine.
Say, does vla-InsertBlock regard system variables like osmode, 3dosmode and insunits?
If not, I think I can kill the handling in my script.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: Wrong insertion point upon automated insertion in BricsCAD with LISP
« Reply #9 on: June 27, 2016, 07:54:31 AM »
Sorry, but that is exactly what I want to avoid. All graphics should remain exactly where they are in the original files.
as said: use the BASE command on the original file.