i need to create a macro to draw a rectangle by two point , the first point is : x = (max margin left of the sheet), y=(pick by mouse) and the second point is : x = (max margin right of the sheet), y=(pick by mouse).
do you have any idea ?
thank you
Marco
Hi Michele,
Michele Salvagno said:do you have any idea ?
it's quite general question. Do you have any code already? Or what you are exactly asking for? The best workflow, general concept or a concrete VBA code?
Michele Salvagno said:i need to create a macro to draw a rectangle by two point
Because you need to create an element, you should start with implementing IPrimitiveCommandEvents object.
Michele Salvagno said:the first point is : x = (max margin left of the sheet)
What is "the sheet"? Is it MicroStation sheet (model with borders) or is it shape or somethings else?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
i don't have any code and i need a concrete VBA code, most of all i don't know how to write a code to draw a polygon (place block) in a 3d model dgn .
a place block command required follow input: first point x,y,z and opposite corner x,y,z ;
so i need : first point x ( - infinity ) , y (pick to mouse) , z = 0 and opposite corner x = + infinity , y = pick to mouse , z = 0.
i need the vba code that ask me only to pick (about first point) y coordinates , and second pick (about opposite corner) y coordinates.
Michele Salvagno said:i don't have any code and i need a concrete VBA code
Ok, so it's not about to help with code (because of some issue) or a help with writing code, but about a request "write code for me"? It sounds like request for a commercial work. Why not, but it should be expressed clearly and openly, because a main purpose of this forum is to help people with writing their own code.