Hi Johnny,
This is slightly tricky - if you don't want to have to enter the lib/cell/view in a form (as initiated by a call to leHiCreateInst() ) then you would need to call something like dbCreateInstByMasterName() - the problem is that this function needs a location (origin) to place the instance at. I would use something like "enterPoint" or "enterPoints" to gather the instance location(s) and use the addPointProc to place the instance at the most recently provided coordinate (which would be something like car(last(pts)), assuming "pts" was the argument used for the addPointProc function). The following is an approximation of what you need:
procedure(CCFeditMenuCB()
enterPoints(?prompts list("Point at the location for the instance")
?addPointProc "CCFcreateInstAtPoint"
)
)
procedure(CCFcreateInstAtPoint(win pts)
dbCreateInstByMasterName(
geGetEditCellView(win)
<libNameHere> ;; this is where you hard-code the library, cell and view names
<cellNameHere>
<viewNameHere>
nil ;; let the editor choose the instance name
car(last(pts))
"R0" ;; hard-code orientation of R0
)
)
The name that you put in the edit menu item callback is "CCFeditMenuCB". Once you call this it starts a call to enterPoints that allows you to place one or more instances, and when you are doing you just hit the Escape key.
I hope that this helps you.
Regards,
Lawrence.