Is it possible to change the origin of a ParametricCellDefinitionElement while placing a new ParametricCellElement using said definition?What i'm trying to achieve with this is the ability to anchor the cell's different corners to the cursor, without needing to create a separate cell for each anchor point.AFAIK the cell always gets placed with its origin point at the tip of your cursor, so if I have a square with the origin in the bottom left, it'll anchor bottom left, if the origin is at the top right it'll anchor to the top right etc. However this approach would require 4 different variations of the same cell but just with different origins which seem a bit excessive. So is there a way to change this origin point when creating a new instance of a ParametricCellDefinitionElement? Or is there a better approach to this in general?Searching the docs for "Origin" gives me the "Origin" property, but this is get only. As well as only returning classes such as "GetOrigin" which don't have a matching "SetOrigin". And neither does "ParametricCellElement.Create" have any overloads that allow you to define an origin point.Kind regards,Remy Moerland
Remy Moerland said:What i'm trying to achieve with this is the ability to anchor the cell's different corners to the cursor, without needing to create a separate cell for each anchor point.
I've achieved that in the past with a normal cell. You need something in the cell definition that you can identify as a PlacePoint. For example, an empty cell named PlacePoint. There should be one PlacePoint for each possible orientation.
In your place cell tool, find the PlacePoints in your cell definition. Write code to compute a transform from the cursor to each PlacePoint. While your tool is active, decide which transform to use and apply it to the new cell instance. You can cycle through the PlacePoints while the tool is active by capturing a key-stroke: for example, the Alt key or space bar.
Look in MicroStation Help to see Placement Points. It looks like Bentley Systems are working on similar technology to that described above. It's not yet made it into the APIs — C++ or .NET. You could create a parametric cell interactively and examine an instance using Analyze Element to see if the Placement Points are visible.
Regards, Jon Summers LA Solutions
Answer Verified By: Remy Moerland
Hi Jon,
Jon Summers said:You need something in the cell definition that you can identify as a PlacePoint.
Just to make sure I understand correctly, PlacePoint here is not a pre-defined MicroStation type, but rather it can be anything that I choose to use as one?
Jon Summers said:Look in MicroStation Help to see Placement Points.
This looks promising indeed! I will look into this.Thanks for the help,Regards,Remy Moerland.
Remy Moerland said:This looks promising indeed! I will look into this.
I recommend to check Marco's posts (e.g. this one) when this feature was introduced.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,Thanks for the help, unfortunately it seems like I am unable to see the post as it is in a covered off section for which I will have to apply. I will do so, but think I have enough to try out in the meantime :) Regards,Remy
Remy Moerland said:unfortunately it seems like I am unable to see the post as it is in a covered off section for which I will have to apply
Sorry, you are right. I did not realize it's in Insiders forum that has limited access :-(
Here is another, public, blog, released for Update 15.
Remy Moerland said:I will do so, but think I have enough to try out in the meantime :)
Yes, to test the feature is the best way :-)
Remy Moerland said:This looks promising indeed!
I've added an Idea that Placement Points should be available for normal and shared cells in addition to parametric cells.
Vote cast!As you already mentioned, the Placement Points do not exist in the (public) API yet, would you be able to make an estimate of how long it usually takes for new functionality to make it into the API?
Remy Moerland said:would you be able to make an estimate of how long it usually takes for new functionality to make it into the API?
Neither Jan nor I work for Bentley Systems, so anything we say should be taken with a pinch of salt.
The answer is the same as "How long is a piece of string?" It depends on the technology's complexity, the enthusiasm of the development team and the commitment by marketing towards new technology. Frankly, management's excitement about a revenue non-earner, such as an API, is weak. Add to those considerations the fact that the parametric cell technology is itself a work-in-progress and I conclude by writing that I have no idea when an API for Placement Points might be available.
The best person to put your question to is Robert Hook, who at least sits closer to the development team than us.
Hi Jon Summers,
FWIW.
Being that Placement Points is currently a "Technology Preview" feature vs. "Commercial Release"; the SDK provides/exposes minimal API functionality; like: e.g. a couple published UI/event macros in ..\include\Mstn\MdlApi\dlogids.r.h not likely to help much.
SYNONYMID_PlacementPointCellHOOKITEMID_Option_PlacementPointCOMBOBOXID_PlacementPoint
MicroStation provides some related key-in functionality. e.g. "placementpoints" (PlacementPoints.dll) and "multipointplacement" (MultiPointPlacementxx.dll).
I will check with the developer that created this functionality and report back here if/when any public API may be published.
HTH,Bob
I checked with development and product management. Our general policy is not to publish APIs for features that are in either Technology Preview (limited) or General Access states. Once a feature progresses to Commercially Available a review of relevant product areas will be performed to ensure no critical issues are identified; and if none found; likely publish related API(s) in a future release.
hi Robert,thanks for info on the (expected) release cycle and relevant key ins, those might be able to help me out.regards,Remy
Hi All,
UPDATE: Please make sure to follow "Placement Points should be available for all cell types" and the most recent comment/update added that more extended and new functionality will be added in the next releases (likely: MSCE U16.1 and U17+). Once the features and APIs (internally) fully tested both likely will become available for Commercial Release status.