I am developing a plugin that import block from .3dm and support setting position with mouse via api GetPoint.
But when adding block definition using api InstanceDefinitionTable.Add, need “Point3d basePoint”, and i can’t get it from .3dm.
imported file is below, and it is nested block WallBoxCylinder.3dm (84.8 KB)
If you insert 3dm file (FileToImport.3dm) into your file as a new block instance by UI, base-point of new block is World coordinates origin (0,0,0) from FileToImport.3dm file.
Your new block instance contains nested blocks and they are available in your new fie, you can insert them using UI by _Insert command and select block definition name from available blocks. By doing so, and selecting insert point as origin (0,0,0), base point of just newly inserted block will be in the origin.
Is it possible to store base point of block when save block to a .3dm file? If that, we can import block and set insert point dynamically via getpoint in one step; otherwise, user should import block to world origin and then move it to wanted position.